home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 2004 May / SGI IRIX 6.5 Applications 2004 May.iso / relnotes / nedit / nedit.doc < prev    next >
Encoding:
Text File  |  2004-04-07  |  196.5 KB  |  4,605 lines

  1.                =========================================
  2.                Nirvana Editor (NEdit) Help Documentation
  3.                =========================================
  4.  
  5. NEdit 5.3                                               June 1, 2002
  6.  
  7.   NEdit is a standard GUI (Graphical User Interface) style text editor for 
  8.   programs and plain-text files. Users of Macintosh and MS Windows based text 
  9.   editors should find NEdit a familiar and comfortable environment. NEdit 
  10.   provides all of the standard menu, dialog, editing, and mouse support, as 
  11.   well as all of the standard shortcuts to which the users of modern GUI based 
  12.   environments are accustomed. For users of older style Unix editors, welcome 
  13.   to the world of mouse-based editing! 
  14.  
  15.   NEdit is freely distributed under the terms of the Gnu General Public 
  16.   License. 
  17.  
  18. ----------------
  19. INSTALLING NEDIT
  20. ----------------
  21.  
  22.   NEdit is a single stand-alone executable file which can be installed by 
  23.   simply copying the appropriate executable "nedit" for your system. Both 
  24.   sources and executables are available from http://www.nedit.org. The 
  25.   optional "nc" (NEdit Client) program is also available for users who want to 
  26.   run nedit in client/server mode. 
  27.  
  28. ---------------
  29. GETTING STARTED
  30. ---------------
  31.  
  32.   Help sections of interest to new users are listed under the "Basic 
  33.   Operation" heading in the top-level Help menu: 
  34.  
  35.     * Selecting Text
  36.     * Finding and Replacing Text
  37.     * Cut and Paste
  38.     * Using the Mouse
  39.     * Keyboard Shortcuts
  40.     * Shifting and Filling
  41.  
  42.   Programmers should also read the introductory section under the "Features 
  43.   for Programming" section: 
  44.  
  45.       Programming with NEdit
  46.  
  47.   If you get into trouble, the Undo command in the Edit menu can reverse any 
  48.   modifications that you make. NEdit does not change the file you are editing 
  49.   until you tell it to Save. 
  50.  
  51.  
  52.   EDITING AN EXISTING FILE
  53.  
  54.   To open an existing file, choose Open... from the file menu. Select the file 
  55.   that you want to open in the pop-up dialog that appears and click on OK. You 
  56.   may open any number of files at the same time. Each file will appear in its 
  57.   own editor window. Using Open... rather than re-typing the NEdit command and 
  58.   running additional copies of NEdit, will give you quick access to all of the 
  59.   files you have open via the Windows menu, and ensure that you don't 
  60.   accidentally open the same file twice. NEdit has no "main" window. It 
  61.   remains running as long as at least one editor window is open. 
  62.  
  63.  
  64.   CREATING A NEW FILE
  65.  
  66.   If you already have an empty (Untitled) window displayed, just begin typing 
  67.   in the window. To create a new Untitled window, choose New from the File 
  68.   menu. To give the file a name and save its contents to the disk, choose Save 
  69.   or Save As... from the File menu. 
  70.  
  71.  
  72.   BACKUP FILES
  73.  
  74.   NEdit maintains periodic backups of the file you are editing so that you can 
  75.   recover the file in the event of a problem such as a system crash, network 
  76.   failure, or X server crash. These files are saved under the name `~filename` 
  77.   (on Unix) or `_filename` (on VMS), where filename is the name of the file 
  78.   you were editing. If an NEdit process is killed, some of these backup files 
  79.   may remain in your directory. (To remove one of these files on Unix, you may 
  80.   have to prefix the `~' (tilde) character with a (backslash) to prevent the 
  81.   shell from interpreting it as a special character.) 
  82.  
  83.  
  84.   SHORTCUTS
  85.  
  86.   As you become more familiar with NEdit, substitute the control and function 
  87.   keys shown on the right side of the menus for pulling down menus with the 
  88.   mouse. 
  89.  
  90.   Dialogs are also streamlined so you can enter information quickly and 
  91.   without using the mouse*. To move the keyboard focus around a dialog, use 
  92.   the tab and arrow keys. One of the buttons in a dialog is usually drawn with 
  93.   a thick, indented, outline. This button can be activated by pressing Return 
  94.   or Enter. The Cancel or Dismiss button can be activated by pressing escape. 
  95.   For example, to replace the string "thing" with "things" type: 
  96.  
  97.       <ctrl-r>thing<tab>things<return>
  98.  
  99.   To open a file named "whole_earth.c", type: 
  100.  
  101.       <ctrl-o>who<return>
  102.  
  103.   (how much of the filename you need to type depends on the other files in the 
  104.   directory). See the section called "Keyboard Shortcuts" for more details. 
  105.  
  106.   * Users who have set their keyboard focus mode to "pointer" should set 
  107.   "Popups Under Pointer" in the Default Settings menu to avoid the additional 
  108.   step of moving the mouse into the dialog. 
  109.  
  110. ===============
  111. BASIC OPERATION
  112. ===============
  113.  
  114. --------------
  115. SELECTING TEXT
  116. --------------
  117.  
  118.   NEdit has two general types of selections, primary (highlighted text), and 
  119.   secondary (underlined text). Selections can cover either a simple range of 
  120.   text between two points in the file, or they can cover a rectangular area of 
  121.   the file. Rectangular selections are only useful with non-proportional 
  122.   (fixed spacing) fonts. 
  123.  
  124.   To select text for copying, deleting, or replacing, press the left mouse 
  125.   button with the pointer at one end of the text you want to select, and drag 
  126.   it to the other end. The text will become highlighted. To select a whole 
  127.   word, double click (click twice quickly in succession). Double clicking and 
  128.   then dragging the mouse will select a number of words. Similarly, you can 
  129.   select a whole line or a number of lines by triple clicking or triple 
  130.   clicking and dragging. Quadruple clicking selects the whole file. After 
  131.   releasing the mouse button, you can still adjust a selection by holding down 
  132.   the shift key and dragging on either end of the selection. To delete the 
  133.   selected text, press delete or backspace. To replace it, begin typing. 
  134.  
  135.   To select a rectangle or column of text, hold the Ctrl key while dragging 
  136.   the mouse. Rectangular selections can be used in any context that normal 
  137.   selections can be used, including cutting and pasting, filling, shifting, 
  138.   dragging, and searching. Operations on rectangular selections automatically 
  139.   fill in tabs and spaces to maintain alignment of text within and to the 
  140.   right of the selection. Note that the interpretation of rectangular 
  141.   selections by Fill Paragraph is slightly different from that of other 
  142.   commands, the section titled "Shifting and Filling" has details. 
  143.  
  144.   The middle mouse button can be used to make an additional selection (called 
  145.   the secondary selection). As soon as the button is released, the contents of 
  146.   this selection will be copied to the insert position of the window where the 
  147.   mouse was last clicked (the destination window). This position is marked by 
  148.   a caret shaped cursor when the mouse is outside of the destination window. 
  149.   If there is a (primary) selection, adjacent to the cursor in the window, the 
  150.   new text will replace the selected text. Holding the shift key while making 
  151.   the secondary selection will move the text, deleting it at the site of the 
  152.   secondary selection, rather than copying it. 
  153.  
  154.   Selected text can also be dragged to a new location in the file using the 
  155.   middle mouse button. Holding the shift key while dragging the text will copy 
  156.   the selected text, leaving the original text in place. Holding the control 
  157.   key will drag the text in overlay mode. 
  158.  
  159.   Normally, dragging moves text by removing it from the selected position at 
  160.   the start of the drag, and inserting it at a new position relative to to the 
  161.   mouse. Dragging a block of text over existing characters, displaces the 
  162.   characters to the end of the selection. In overlay mode, characters which 
  163.   are occluded by blocks of text being dragged are simply removed. When 
  164.   dragging non-rectangular selections, overlay mode also converts the 
  165.   selection to rectangular form, allowing it to be dragged outside of the 
  166.   bounds of the existing text. 
  167.  
  168.   The section "Using the Mouse" sumarizes the mouse commands for making 
  169.   primary and secondary selections. Primary selections can also be made via 
  170.   keyboard commands, see "Keyboard Shortcuts". 
  171.  
  172. --------------------------
  173. FINDING AND REPLACING TEXT
  174. --------------------------
  175.  
  176.   The Search menu contains a number of commands for finding and replacing 
  177.   text. 
  178.  
  179.   The Find... and Replace... commands present dialogs for entering text for 
  180.   searching and replacing. These dialogs also allow you to choose whether you 
  181.   want the search to be sensitive to upper and lower case, or whether to use 
  182.   the standard Unix pattern matching characters (regular expressions). 
  183.   Searches begin at the current text insertion position. 
  184.  
  185.   Find Again and Replace Again repeat the last find or replace command without 
  186.   prompting for search strings. To selectively replace text, use the two 
  187.   commands in combination: Find Again, then Replace Again if the highlighted 
  188.   string should be replaced, or Find Again again to go to the next string. 
  189.  
  190.   Find Selection searches for the text contained in the current primary 
  191.   selection (see Selecting Text). The selected text does not have to be in the 
  192.   current editor window, it may even be in another program. For example, if 
  193.   the word dog appears somewhere in a window on your screen, and you want to 
  194.   find it in the file you are editing, select the word dog by dragging the 
  195.   mouse across it, switch to your NEdit window and choose Find Selection from 
  196.   the Search menu. 
  197.  
  198.   Find Incremental is yet another variation on searching, where every 
  199.   character typed triggers a new search. Incremental searching is generally 
  200.   the quickest way to find something in a file, because it gives you the 
  201.   immediate feedback of seeing how your search is progressing, so you never 
  202.   need to type more than the minimally sufficient search string to reach your 
  203.   target. 
  204.  
  205.  
  206.   SEARCHING BACKWARDS
  207.  
  208.   Holding down the shift key while choosing any of the search or replace 
  209.   commands from the menu (or using the keyboard shortcut), will search in the 
  210.   reverse direction. Users who have set the search direction using the buttons 
  211.   in the search dialog, may find it a bit confusing that Find Again and 
  212.   Replace Again don't continue in the same direction as the original search 
  213.   (for experienced users, consistency of the direction implied by the shift 
  214.   key is more important). 
  215.  
  216.  
  217.   SELECTIVE REPLACEMENT
  218.  
  219.   To replace only some occurrences of a string within a file, choose 
  220.   Replace... from the Search menu, enter the string to search for and the 
  221.   string to substitute, and finish by pressing the Find button. When the first 
  222.   occurrence is highlighted, use either Replace Again (^T) to replace it, or 
  223.   Find Again (^G) to move to the next occurrence without replacing it, and 
  224.   continue in such a manner through all occurrences of interest. 
  225.  
  226.   To replace all occurrences of a string within some range of text, select the 
  227.   range (see Selecting Text), choose Replace... from the Search menu, type the 
  228.   string to search for and the string to substitute, and press the "R. in 
  229.   Selection" button in the dialog. Note that selecting text in the Replace... 
  230.   dialog will unselect the text in the window. 
  231.  
  232. -------------
  233. CUT AND PASTE
  234. -------------
  235.  
  236.   The easiest way to copy and move text around in your file or between 
  237.   windows, is to use the clipboard, an imaginary area that temporarily stores 
  238.   text and data. The Cut command removes the selected text (see Selecting 
  239.   Text) from your file and places it in the clipboard. Once text is in the 
  240.   clipboard, the Paste command will copy it to the insert position in the 
  241.   current window. For example, to move some text from one place to another, 
  242.   select it by dragging the mouse over it, choose Cut to remove it, click the 
  243.   pointer to move the insert point where you want the text inserted, then 
  244.   choose Paste to insert it. Copy copies text to the clipboard without 
  245.   deleting it from your file. You can also use the clipboard to transfer text 
  246.   to and from other Motif programs and X programs which make proper use of the 
  247.   clipboard. 
  248.  
  249.   There are many other methods for copying and moving text within NEdit 
  250.   windows and between NEdit and other programs. The most common such method is 
  251.   clicking the middle mouse button to copy the primary selection (to the 
  252.   clicked position). Copying the selection by clicking the middle mouse button 
  253.   in many cases is the only way to transfer data to and from many X programs. 
  254.   Holding the Shift key while clicking the middle mouse button moves the text, 
  255.   deleting it from its original position, rather than copying it. Other 
  256.   methods for transferring text include secondary selections, primary 
  257.   selection dragging, keyboard-based selection copying, and drag and drop. 
  258.   These are described in detail in the sections: "Selecting Text", 
  259.   "Using_the_Mouse_", and "Keyboard Shortcuts". 
  260.  
  261. ---------------
  262. USING THE MOUSE
  263. ---------------
  264.  
  265.   Mouse-based editing is what NEdit is all about, and learning to use the more 
  266.   advanced features like secondary selections and primary selection dragging 
  267.   will be well worth your while. 
  268.  
  269.   If you don't have time to learn everything, you can get by adequately with 
  270.   just the left mouse button: Clicking the left button moves the cursor. 
  271.   Dragging with the left button makes a selection. Holding the shift key while 
  272.   clicking extends the existing selection, or begins a selection between the 
  273.   cursor and the mouse. Double or triple clicking selects a whole word or a 
  274.   whole line. 
  275.  
  276.   This section will make more sense if you also read the section called, 
  277.   "Selecting Text", which explains the terminology of selections, that is, 
  278.   what is meant by primary, secondary, rectangular, etc. 
  279.  
  280.  
  281.   BUTTON AND MODIFIER KEY SUMMARY
  282.  
  283.   General meaning of mouse buttons and modifier keys: 
  284.  
  285.  
  286.     Buttons
  287.  
  288.       Button 1 (left)    Cursor position and primary selection
  289.  
  290.       Button 2 (middle)  Secondary selections, and dragging and
  291.                          copying the primary selection
  292.  
  293.       Button 3 (right)   Quick-access programmable menu and pan
  294.                          scrolling
  295.  
  296.  
  297.     Modifier keys
  298.  
  299.       Shift   On primary selections, (left mouse button):
  300.                  Extends selection to the mouse pointer
  301.               On secondary and copy operations, (middle):
  302.                  Toggles between move and copy
  303.  
  304.       Ctrl    Makes selection rectangular or insertion
  305.               columnar
  306.  
  307.       Alt*    (on release) Exchange primary and secondary
  308.               selections.
  309.  
  310.  
  311.   LEFT MOUSE BUTTON
  312.  
  313.   The left mouse button is used to position the cursor and to make primary 
  314.   selections. 
  315.  
  316.     Click         Moves the cursor
  317.  
  318.     Double Click  Selects a whole word
  319.  
  320.     Triple Click  Selects a whole line
  321.  
  322.     Quad Click    Selects the whole file
  323.  
  324.     Shift Click   Adjusts (extends or shrinks) the
  325.                   selection, or if there is no existing
  326.                   selection, begins a new selection
  327.                   between the cursor and the mouse.
  328.  
  329.     Ctrl+Shift+   Adjusts (extends or shrinks) the
  330.     Click         selection rectangularly.
  331.  
  332.     Drag          Selects text between where the mouse
  333.                   was pressed and where it was released.
  334.  
  335.     Ctrl+Drag     Selects rectangle between where the
  336.                   mouse was pressed and where it was
  337.                   released.
  338.  
  339.  
  340.   RIGHT MOUSE BUTTON
  341.  
  342.   The right mouse button posts a programmable menu for frequently used 
  343.   commands. 
  344.  
  345.     Click/Drag    Pops up the background menu (programmed
  346.                   from Preferences -> Default Settings ->
  347.                   Customize Menus -> Window Background).
  348.  
  349.     Ctrl+Drag     Pan scrolling.  Scrolls the window
  350.                   both vertically and horizontally, as if
  351.                   you had grabbed it with your mouse.
  352.  
  353.  
  354.   MIDDLE MOUSE BUTTON
  355.  
  356.   The middle mouse button is for making secondary selections, and copying and 
  357.   dragging the primary selection. 
  358.  
  359.     Click         Copies the primary selection to the
  360.                   clicked position.
  361.  
  362.     Shift+Click   Moves the primary selection to the
  363.                   clicked position, deleting it from its
  364.                   original position.
  365.  
  366.     Drag          1) Outside of the primary selection:
  367.                       Begins a secondary selection.
  368.                   2) Inside of the primary selection:
  369.                       Moves the selection by dragging.
  370.  
  371.     Ctrl+Drag     1) Outside of the primary selection:
  372.                       Begins a rectangular secondary
  373.                       selection.
  374.                   2) Inside of the primary selection:
  375.                       Drags the selection in overlay
  376.                       mode (see below).
  377.  
  378.   When the mouse button is released after creating a secondary selection: 
  379.  
  380.     No Modifiers  If there is a primary selection,
  381.                   replaces it with the secondary
  382.                   selection.  Otherwise, inserts the
  383.                   secondary selection at the cursor
  384.                   position.
  385.  
  386.     Shift         Move the secondary selection, deleting
  387.                   it from its original position.  If
  388.                   there is a primary selection, the move
  389.                   will replace the primary selection
  390.                   with the secondary selection.
  391.                   Otherwise, moves the secondary
  392.                   selection to to the cursor position.
  393.  
  394.     Alt*          Exchange the primary and secondary
  395.                   selections.
  396.  
  397.   While moving the primary selection by dragging with the middle mouse button: 
  398.  
  399.     Shift         Leaves a copy of the original
  400.                   selection in place rather than
  401.                   removing it or blanking the area.
  402.  
  403.     Ctrl          Changes from insert mode to overlay
  404.                   mode (see below).
  405.  
  406.     Escape        Cancels drag in progress.
  407.  
  408.   Overlay Mode: Normally, dragging moves text by removing it from the selected 
  409.   position at the start of the drag, and inserting it at a new position 
  410.   relative to to the mouse. When you drag a block of text over existing 
  411.   characters, the existing characters are displaced to the end of the 
  412.   selection. In overlay mode, characters which are occluded by blocks of text 
  413.   being dragged are simply removed. When dragging non-rectangular selections, 
  414.   overlay mode also converts the selection to rectangular form, allowing it to 
  415.   be dragged outside of the bounds of the existing text. 
  416.  
  417.   Mouse buttons 4 and 5 are usually represented by a mouse wheel nowadays. 
  418.   They are used to scroll up or down in the text window. 
  419.  
  420.   * The Alt key may be labeled Meta or Compose-Character on some keyboards. 
  421.   Some window managers, including default configurations of mwm, bind 
  422.   combinations of the Alt key and mouse buttons to window manager operations. 
  423.   In NEdit, Alt is only used on button release, so regardless of the window 
  424.   manager bindings for Alt-modified mouse buttons, you can still do the 
  425.   corresponding NEdit operation by using the Alt key AFTER the initial mouse 
  426.   press, so that Alt is held while you release the mouse button. If you find 
  427.   this difficult or annoying, you can re-configure most window managers to 
  428.   skip this binding, or you can re-configure NEdit to use a different key 
  429.   combination. 
  430.  
  431. ------------------
  432. KEYBOARD SHORTCUTS
  433. ------------------
  434.  
  435.   Most of the keyboard shortcuts in NEdit are shown on the right hand sides of 
  436.   the pull-down menus. However, there are more which are not as obvious. These 
  437.   include; dialog button shortcuts; menu and dialog mnemonics; labeled 
  438.   keyboard keys, such as the arrows, page-up, page-down, and home; and 
  439.   optional Shift modifiers on accelerator keys, like [Shift]Ctrl+F. 
  440.  
  441.  
  442.   MENU ACCELERATORS
  443.  
  444.   Pressing the key combinations shown on the right of the menu items is a 
  445.   shortcut for selecting the menu item with the mouse. Some items have the 
  446.   shift key enclosed in brackets, such as [Shift]Ctrl+F. This indicates that 
  447.   the shift key is optional. In search commands, including the shift key 
  448.   reverses the direction of the search. In Shift commands, it makes the 
  449.   command shift the selected text by a whole tab stop rather than by single 
  450.   characters. 
  451.  
  452.  
  453.   MENU MNEMONICS
  454.  
  455.   Pressing the Alt key in combination with one of the underlined characters in 
  456.   the menu bar pulls down that menu. Once the menu is pulled down, typing the 
  457.   underlined characters in a menu item (without the Alt key) activates that 
  458.   item. With a menu pulled down, you can also use the arrow keys to select 
  459.   menu items, and the Space or Enter keys to activate them. 
  460.  
  461.  
  462.   KEYBOARD SHORTCUTS WITHIN DIALOGS
  463.  
  464.   One button in a dialog is usually marked with a thick indented outline. 
  465.   Pressing the Return or Enter key activates this button. 
  466.  
  467.   All dialogs have either a Cancel or Dismiss button. This button can be 
  468.   activated by pressing the Escape (or Esc) key. 
  469.  
  470.   Pressing the tab key moves the keyboard focus to the next item in a dialog. 
  471.   Within an associated group of buttons, the arrow keys move the focus among 
  472.   the buttons. Shift+Tab moves backward through the items. 
  473.  
  474.   Most items in dialogs have an underline under one character in their name. 
  475.   Pressing the Alt key along with this character, activates a button as if you 
  476.   had pressed it with the mouse, or moves the keyboard focus to the associated 
  477.   text field or list. 
  478.  
  479.   You can select items from a list by using the arrow keys to move the 
  480.   selection and space to select. 
  481.  
  482.   In file selection dialogs, you can type the beginning characters of the file 
  483.   name or directory in the list to select files 
  484.  
  485.  
  486.   LABELED FUNCTION KEYS
  487.  
  488.   The labeled function keys on standard workstation and PC keyboards, like the 
  489.   arrows, and page-up and page-down, are active in NEdit, though not shown in 
  490.   the pull-down menus. 
  491.  
  492.   Holding down the control key while pressing a named key extends the scope of 
  493.   the action that it performs. For example, Home normally moves the insert 
  494.   cursor the beginning of a line. Ctrl+Home moves it to the beginning of the 
  495.   file. Backspace deletes one character, Ctrl+Backspace deletes one word. 
  496.  
  497.   Holding down the shift key while pressing a named key begins or extends a 
  498.   selection. Combining the shift and control keys combines their actions. For 
  499.   example, to select a word without using the mouse, position the cursor at 
  500.   the beginning of the word and press Ctrl+Shift+RightArrow. The Alt key 
  501.   modifies selection commands to make the selection rectangular. 
  502.  
  503.   Under X and Motif, there are several levels of translation between keyboard 
  504.   keys and the actions they perform in a program. The "Customizing NEdit", and 
  505.   "X Resources" sections of the Help menu have more information on this 
  506.   subject. Because of all of this configurability, and since keyboards and 
  507.   standards for the meaning of some keys vary from machine to machine, the 
  508.   mappings may be changed from the defaults listed below. 
  509.  
  510.  
  511.   MODIFIER KEYS (IN GENERAL)
  512.  
  513.     Ctrl   Extends the scope of the action that the key
  514.            would otherwise perform.  For example, Home
  515.            normally moves the insert cursor to the beginning
  516.            of a line. Ctrl+Home moves it to the beginning of
  517.            the file.  Backspace deletes one character, Ctrl+
  518.            Backspace deletes one word.
  519.  
  520.     Shift  Extends the selection to the cursor position. If
  521.            there's no selection, begins one between the old
  522.            and new cursor positions.
  523.  
  524.     Alt    When modifying a selection, makes the selection
  525.            rectangular.
  526.  
  527.   (For the effects of modifier keys on mouse button presses, see the section 
  528.   titled "Using the Mouse") 
  529.  
  530.  
  531.   ALL KEYBOARDS
  532.  
  533.     Escape        Cancels operation in progress: menu
  534.                   selection, drag, selection, etc.  Also
  535.                   equivalent to cancel button in dialogs.
  536.  
  537.     Backspace     Delete the character before the cursor
  538.  
  539.     Ctrl+BS       Delete the word before the cursor
  540.  
  541.     Arrows --
  542.  
  543.       Left        Move the cursor to the left one character
  544.  
  545.       Ctrl+Left   Move the cursor backward one word
  546.                   (Word delimiters are settable, see
  547.                   "Customizing NEdit", and "X_Resources_")
  548.  
  549.       Right       Move the cursor to the right one character
  550.  
  551.       Ctrl+Right  Move the cursor forward one word
  552.  
  553.       Up          Move the cursor up one line
  554.  
  555.       Ctrl+Up     Move the cursor up one paragraph.
  556.                   (Paragraphs are delimited by blank lines)
  557.  
  558.       Down        Move the cursor down one line.
  559.  
  560.       Ctrl+Down   Move the cursor down one paragraph.
  561.  
  562.     Ctrl+Return   Return with automatic indent, regardless
  563.                   of the setting of Auto Indent.
  564.  
  565.     Shift+Return  Return without automatic indent,
  566.                   regardless of the setting of Auto Indent.
  567.  
  568.     Ctrl+Tab      Insert an ASCII tab character, without
  569.                   processing emulated tabs.
  570.  
  571.     Alt+Ctrl+<c>  Insert the control-code equivalent of
  572.                   a key <c>
  573.  
  574.     Ctrl+/        Select everything (same as Select
  575.                   All menu item or ^A)
  576.  
  577.     Ctrl+\        Unselect
  578.  
  579.     Ctrl+U        Delete to start of line
  580.  
  581.  
  582.   PC STANDARD KEYBOARD
  583.  
  584.     Ctrl+Insert   Copy the primary selection to the
  585.                   clipboard (same as Copy menu item or ^C)
  586.                   for compatibility with Motif standard key
  587.                   binding
  588.     Shift+Ctrl+
  589.     Insert        Copy the primary selection to the cursor
  590.                   location.
  591.  
  592.     Delete        Delete the character before the cursor.
  593.                   (Can be configured to delete the character
  594.                   after the cursor, see "Customizing NEdit",
  595.                   and "X Resources")
  596.  
  597.     Ctrl+Delete   Delete to end of line.
  598.  
  599.     Shift+Delete  Cut, remove the currently selected text
  600.                   and place it in the clipboard. (same as
  601.                   Cut menu item or ^X) for compatibility
  602.                   with Motif standard key binding
  603.     Shift+Ctrl+
  604.     Delete        Cut the primary selection to the cursor
  605.                   location.
  606.  
  607.     Home          Move the cursor to the beginning of the
  608.                   line
  609.  
  610.     Ctrl+Home     Move the cursor to the beginning of the
  611.                   file
  612.  
  613.     End           Move the cursor to the end of the line
  614.  
  615.     Ctrl+End      Move the cursor to the end of the file
  616.  
  617.     PageUp        Scroll and move the cursor up by one page.
  618.  
  619.     Ctrl+PageUp   Scroll and move the cursor left by one
  620.                   page.
  621.     PageDown      Scroll and move the cursor down by one
  622.                   page.
  623.  
  624.     Ctrl+PageDown Scroll and move the cursor right by one
  625.                   page.
  626.  
  627.     F10           Make the menu bar active for keyboard
  628.                   input (Arrow Keys, Return, Escape,
  629.                   and the Space Bar)
  630.  
  631.  
  632.   SPECIALTY KEYBOARDS  
  633.  
  634.   On machines with different styles of keyboards, generally, text editing 
  635.   actions are properly matched to the labeled keys, such as Remove, 
  636.   Next-screen, etc.. If you prefer different key bindings, see the section 
  637.   titled "Key Binding" under the Customizing heading in the Help menu. 
  638.  
  639. --------------------
  640. SHIFTING AND FILLING
  641. --------------------
  642.  
  643.  
  644.   SHIFT LEFT, SHIFT RIGHT
  645.  
  646.   While shifting blocks of text is most important for programmers (See 
  647.   Features for Programming), it is also useful for other tasks, such as 
  648.   creating indented paragraphs. 
  649.  
  650.   To shift a block of text one tab stop to the right, select the text, then 
  651.   choose Shift Right from the Edit menu. Note that the accelerator keys for 
  652.   these menu items are Ctrl+9 and Ctrl+0, which correspond to the right and 
  653.   left parenthesis on most keyboards. Remember them as adjusting the text in 
  654.   the direction pointed to by the parenthesis character. Holding the Shift key 
  655.   while selecting either Shift Left or Shift Right will shift the text by one 
  656.   character. 
  657.  
  658.   It is also possible to shift blocks of text by selecting the text 
  659.   rectangularly, and dragging it left or right (and up or down as well). Using 
  660.   a rectangular selection also causes tabs within the selection to be 
  661.   recalculated and substituted, such that the non-whitespace characters remain 
  662.   stationary with respect to the selection. 
  663.  
  664.  
  665.   FILLING  
  666.  
  667.   Text filling using the Fill Paragraph command in the Edit menu is one of the 
  668.   most important concepts in NEdit. And it will be well worth your while to 
  669.   understand how to use it properly. 
  670.  
  671.   In plain text files, unlike word-processor files, there is no way to tell 
  672.   which lines are continuations of other lines, and which lines are meant to 
  673.   be separate, because there is no distinction in meaning between newline 
  674.   characters which separate lines in a paragraph, and ones which separate 
  675.   paragraphs from other text. This makes it impossible for a text editor like 
  676.   NEdit to tell parts of the text which belong together as a paragraph from 
  677.   carefully arranged individual lines. 
  678.  
  679.   In continuous wrap mode (Preferences -> Wrap -> Continuous), lines 
  680.   automatically wrap and unwrap themselves to line up properly at the right 
  681.   margin. In this mode, you simply omit the newlines within paragraphs and let 
  682.   NEdit make the line breaks as needed. Unfortunately, continuous wrap mode is 
  683.   not appropriate in the majority of situations, because files with extremely 
  684.   long lines are not common under Unix and may not be compatible with all 
  685.   tools, and because you can't achieve effects like indented sections, 
  686.   columns, or program comments, and still take advantage of the automatic 
  687.   wrapping. 
  688.  
  689.   Without continuous wrapping, paragraph filling is not entirely automatic. 
  690.   Auto-Newline wrapping keeps paragraphs lined up as you type, but once 
  691.   entered, NEdit can no longer distinguish newlines which join wrapped text, 
  692.   and newlines which must be preserved. Therefore, editing in the middle of a 
  693.   paragraph will often leave the right margin messy and uneven. 
  694.  
  695.   Since NEdit can't act automatically to keep your text lined up, you need to 
  696.   tell it explicitly where to operate, and that is what Fill Paragraph is for. 
  697.   It arranges lines to fill the space between two margins, wrapping the lines 
  698.   neatly at word boundaries. Normally, the left margin for filling is inferred 
  699.   from the text being filled. The first line of each paragraph is considered 
  700.   special, and its left indentation is maintained separately from the 
  701.   remaining lines (for leading indents, bullet points, numbered paragraphs, 
  702.   etc.). Otherwise, the left margin is determined by the furthest left 
  703.   non-whitespace character. The right margin is either the Wrap Margin, set in 
  704.   the preferences menu (by default, the right edge of the window), or can also 
  705.   be chosen on the fly by using a rectangular selection (see below). 
  706.  
  707.   There are three ways to use Fill Paragraph. The simplest is, while you are 
  708.   typing text, and there is no selection, simply select Fill Paragraph (or 
  709.   type Ctrl+J), and NEdit will arrange the text in the paragraph adjacent to 
  710.   the cursor. A paragraph, in this case, means an area of text delimited by 
  711.   blank lines. 
  712.  
  713.   The second way to use Fill Paragraph is with a selection. If you select a 
  714.   range of text and then chose Fill Paragraph, all of the text in the 
  715.   selection will be filled. Again, continuous text between blank lines is 
  716.   interpreted as paragraphs and filled individually, respecting leading 
  717.   indents and blank lines. 
  718.  
  719.   The third, and most versatile, way to use Fill Paragraph is with a 
  720.   rectangular selection. Fill Paragraph treats rectangular selections 
  721.   differently from other commands. Instead of simply filling the text inside 
  722.   the rectangular selection, NEdit interprets the right edge of the selection 
  723.   as the requested wrap margin. Text to the left of the selection is not 
  724.   disturbed (the usual interpretation of a rectangular selection), but text to 
  725.   the right of the selection is included in the operation and is pulled in to 
  726.   the selected region. This method enables you to fill text to an arbitrary 
  727.   right margin, without going back and forth to the wrap-margin dialog, as 
  728.   well as to exclude text to the left of the selection such as comment bars or 
  729.   other text columns. 
  730.  
  731. -----------
  732. FILE FORMAT
  733. -----------
  734.  
  735.   While plain-text is probably the simplest and most interchangeable file 
  736.   format in the computer world, there is still variation in what plain-text 
  737.   means from system to system. Plain-text files can differ in character set, 
  738.   line termination, and wrapping. 
  739.  
  740.   While character set differences are the most obvious and pose the most 
  741.   challenge to portability, they affect NEdit only indirectly via the same 
  742.   font and localization mechanisms common to all X applications. If your 
  743.   system is set up properly, you will probably never see character-set related 
  744.   problems in NEdit. NEdit can not display Unicode text files, or any 
  745.   multi-byte character set. 
  746.  
  747.   The primary difference between an MS DOS format file and a Unix format file, 
  748.   is how the lines are terminated. Unix uses a single newline character. MS 
  749.   DOS uses a carriage-return and a newline. NEdit can read and write both file 
  750.   formats, but internally, it uses the single character Unix standard. NEdit 
  751.   auto-detects MS DOS format files based on the line termination at the start 
  752.   of the file. Files are judged to be DOS format if all of the first five line 
  753.   terminators, within a maximum range, are DOS-style. To change the format in 
  754.   which NEdit writes a file from DOS to Unix or visa versa, use the Save As... 
  755.   command and check or un-check the MS DOS Format button. 
  756.  
  757.   Wrapping within text files can vary among individual users, as well as from 
  758.   system to system. Both Windows and MacOS make frequent use of plain text 
  759.   files with no implicit right margin. In these files, wrapping is determined 
  760.   by the tool which displays them. Files of this style also exist on Unix 
  761.   systems, despite the fact that they are not supported by all Unix utilities. 
  762.   To display this kind of file properly in NEdit, you have to select the wrap 
  763.   style called Continuous. Wrapping modes are discussed in the sections: 
  764.   Customizing -> Preferences, and Basic Operation -> Shifting and Filling. 
  765.  
  766.   The last and most minute of format differences is the terminating newline. 
  767.   Some Unix compilers and utilities require a final terminating newline on all 
  768.   files they read and fail in various ways on files which do not have it. Vi 
  769.   and approximately half of Unix editors enforce the terminating newline on 
  770.   all files that they write; Emacs does not enforce this rule. Users are 
  771.   divided on which is best. NEdit makes the final terminating newline optional 
  772.   (Preferences -> Default Settings -> Append Line Feed on Save). 
  773.  
  774. ========================
  775. FEATURES FOR PROGRAMMING
  776. ========================
  777.  
  778. ----------------------
  779. PROGRAMMING WITH NEDIT
  780. ----------------------
  781.  
  782.   Though general in appearance, NEdit has many features intended specifically 
  783.   for programmers. Major programming-related topics are listed in separate 
  784.   sections under the heading: "Features for Programming": Syntax Highlighting, 
  785.   Tabs/Emulated Tabs, Finding_Declarations_(ctags)_, and Auto/Smart_Indent_. 
  786.   Minor topics related to programming are discussed below: 
  787.  
  788.  
  789.   LANGUAGE MODES
  790.  
  791.   When NEdit initially reads a file, it attempts to determine whether the file 
  792.   is in one of the computer languages that it knows about. Knowing what 
  793.   language a file is written in allows NEdit to assign highlight patterns and 
  794.   smart indent macros, and to set language specific preferences like word 
  795.   delimiters, tab emulation, and auto-indent. Language mode can be recognized 
  796.   from both the file name and from the first 200 characters of content. 
  797.   Language mode recognition and language-specific preferences are configured 
  798.   in: Preferences -> Default Settings -> Language Modes.... 
  799.  
  800.   You can set the language mode manually for a window, by selecting it from 
  801.   the menu: Preferences -> Language Modes. 
  802.  
  803.  
  804.   LINE NUMBERS
  805.  
  806.   To find a particular line in a source file by line number, choose Goto Line 
  807.   #... from the Search menu. You can also directly select the line number text 
  808.   in the compiler message in the terminal emulator window (xterm, decterm, 
  809.   winterm, etc.) where you ran the compiler, and choose Goto Selected from the 
  810.   Search menu. 
  811.  
  812.   To find out the line number of a particular line in your file, turn on 
  813.   Statistics Line in the Preferences menu and position the insertion point 
  814.   anywhere on the line. The statistics line continuously updates the line 
  815.   number of the line containing the cursor. 
  816.  
  817.  
  818.   MATCHING PARENTHESES
  819.  
  820.   To help you inspect nested parentheses, brackets, braces, quotes, and other 
  821.   characters, NEdit has both an automatic parenthesis matching mode, and a 
  822.   Goto Matching command. Automatic parenthesis matching is activated when you 
  823.   type, or move the insertion cursor after a parenthesis, bracket, or brace. 
  824.   It momentarily highlights either the opposite character ('Delimiter') or the 
  825.   entire expression ('Range') when the opposite character is visible in the 
  826.   window. To find a matching character anywhere in the file, select it or 
  827.   position the cursor after it, and choose Goto Matching from the Search menu. 
  828.   If the character matches itself, such as a quote or slash, select the first 
  829.   character of the pair. NEdit will match {, (, [, <, ", ', `, /, and \. 
  830.   Holding the Shift key while typing the accelerator key (Shift+Ctrl+M, by 
  831.   default), will select all of the text between the matching characters. 
  832.  
  833.   When syntax highlighting is enabled, the matching routines can optionally 
  834.   make use of the syntax information for improved accuracy. In that case, a 
  835.   brace inside a highlighted string will not match a brace inside a comment, 
  836.   for instance. 
  837.  
  838.  
  839.   OPENING INCLUDED FILES
  840.  
  841.   The Open Selected command in the File menu understands the C preprocessor's 
  842.   #include syntax, so selecting an #include line and invoking Open Selected 
  843.   will generally find the file referred to, unless doing so depends on the 
  844.   settings of compiler switches or other information not available to NEdit. 
  845.  
  846.  
  847.   INTERFACE TO PROGRAMMING TOOLS
  848.  
  849.   Integrated software development environments such as SGI's CaseVision and 
  850.   Centerline Software's Code Center, can be interfaced directly with NEdit via 
  851.   the client server interface. These tools allow you to click directly on 
  852.   compiler and runtime error messages and request NEdit to open files, and 
  853.   select lines of interest. The easiest method is usually to use the tool's 
  854.   interface for character-based editors like vi, to invoke nc, but 
  855.   programmatic interfaces can also be derived using the source code for nc. 
  856.  
  857.   There are also some simple compile/review, grep, ctree, and ctags browsers 
  858.   available in the NEdit contrib directory on ftp.nedit.org. 
  859.  
  860. ------------------
  861. TABS/EMULATED TABS
  862. ------------------
  863.  
  864.  
  865.   CHANGING THE TAB DISTANCE
  866.  
  867.   Tabs are important for programming in languages which use indentation to 
  868.   show nesting, as short-hand for producing white-space for leading indents. 
  869.   As a programmer, you have to decide how to use indentation, and how or 
  870.   whether tab characters map to your indentation scheme. 
  871.  
  872.   Ideally, tab characters map directly to the amount of indent that you use to 
  873.   distinguish nesting levels in your code. Unfortunately, the Unix standard 
  874.   for interpretation of tab characters is eight characters (probably dating 
  875.   back to mechanical capabilities of the original teletype), which is usually 
  876.   too coarse for a single indent. 
  877.  
  878.   Most text editors, NEdit included, allow you to change the interpretation of 
  879.   the tab character, and many programmers take advantage of this, and set 
  880.   their tabs to 3 or 4 characters to match their programming style. In NEdit 
  881.   you set the hardware tab distance in Preferences -> Tabs... for the current 
  882.   window, or Preferences -> Default Settings -> Tabs... (general), or 
  883.   Preferences -> Default Settings -> Language Modes... (language-specific) to 
  884.   change the defaults for future windows. 
  885.  
  886.   Changing the meaning of the tab character makes programming much easier 
  887.   while you're in the editor, but can cause you headaches outside of the 
  888.   editor, because there is no way to pass along the tab setting as part of a 
  889.   plain-text file. All of the other tools which display, print, and otherwise 
  890.   process your source code have to be made aware of how the tabs are set, and 
  891.   must be able to handle the change. Non-standard tabs can also confuse other 
  892.   programmers, or make editing your code difficult for them if their text 
  893.   editors don't support changes in tab distance. 
  894.  
  895.  
  896.   EMULATED TABS
  897.  
  898.   An alternative to changing the interpretation of the tab character is tab 
  899.   emulation. In the Tabs... dialog(s), turning on Emulated Tabs causes the Tab 
  900.   key to insert the correct number of spaces and/or tabs to bring the cursor 
  901.   the next emulated tab stop, as if tabs were set at the emulated tab distance 
  902.   rather than the hardware tab distance. Backspacing immediately after 
  903.   entering an emulated tab will delete the fictitious tab as a unit, but as 
  904.   soon as you move the cursor away from the spot, NEdit will forget that the 
  905.   collection of spaces and tabs is a tab, and will treat it as separate 
  906.   characters. To enter a real tab character with "Emulate Tabs" turned on, use 
  907.   Ctrl+Tab. 
  908.  
  909.   It is also possible to tell NEdit not to insert ANY tab characters at all in 
  910.   the course of processing emulated tabs, and in shifting and rectangular 
  911.   insertion/deletion operations, for programmers who worry about the 
  912.   misinterpretation of tab characters on other systems. 
  913.  
  914. -----------------
  915. AUTO/SMART INDENT
  916. -----------------
  917.  
  918.   Programmers who use structured languages usually require some form of 
  919.   automatic indent, so that they don't have to continually re-type the 
  920.   sequences of tabs and/or spaces needed to maintain lengthy running indents. 
  921.   Version 5.0 of NEdit is the first release of NEdit to offer "smart" indent, 
  922.   at least experimentally, in addition to the traditional automatic indent 
  923.   which simply lines up the cursor position with the previous line. 
  924.  
  925.  
  926.   SMART INDENT
  927.  
  928.   Smart Indent in this release must still be considered somewhat experimental. 
  929.   Smart indent macros are only available by default for C and C++, and while 
  930.   these can easily be configured for different default indentation distances, 
  931.   they may not conform to everyone's exact C programming style. Smart indent 
  932.   is programmed in terms of macros in the NEdit macro language which can be 
  933.   entered in: Preferences -> Default Settings -> Indent -> Program Smart 
  934.   Indent. Hooks are provided for intervening at the point that a newline is 
  935.   entered, either via the user pressing the Enter key, or through 
  936.   auto-wrapping; and for arbitrary type-in to act on specific characters 
  937.   typed. 
  938.  
  939.   To type a newline character without invoking smart-indent when operating in 
  940.   smart-indent mode, hold the Ctrl key while pressing the Return or Enter key. 
  941.  
  942.  
  943.   AUTO-INDENT
  944.  
  945.   With Indent set to Auto (the default), NEdit keeps a running indent. When 
  946.   you press the Return or Enter key, spaces and tabs are inserted to line up 
  947.   the insert point under the start of the previous line. Ctrl+Return in 
  948.   auto-indent mode acts like a normal Return, With auto-indent turned off, 
  949.   Ctrl+Return does indentation. 
  950.  
  951.  
  952.   BLOCK INDENTATION ADJUSTMENT
  953.  
  954.   The Shift Left and Shift Right commands as well as rectangular dragging can 
  955.   be used to adjust the indentation for several lines at once. To shift a 
  956.   block of text one character to the right, select the text, then choose Shift 
  957.   Right from the Edit menu. Note that the accelerator keys for these menu 
  958.   items are Ctrl+9 and Ctrl+0, which correspond to the right and left 
  959.   parenthesis on most keyboards. Remember them as adjusting the text in the 
  960.   direction pointed to by the parenthesis character. Holding the Shift key 
  961.   while selecting either Shift Left or Shift Right will shift the text by one 
  962.   tab stop (or by one emulated tab stop if tab emulation is turned on). The 
  963.   help section "Shifting and Filling" under "Basic Operation" has details. 
  964.  
  965. -------------------
  966. SYNTAX HIGHLIGHTING
  967. -------------------
  968.  
  969.   Syntax Highlighting means using colors and fonts to help distinguish 
  970.   language elements in programming languages and other types of structured 
  971.   files. Programmers use syntax highlighting to understand code faster and 
  972.   better, and to spot many kinds of syntax errors more quickly. 
  973.  
  974.   To use syntax highlighting in NEdit, select Highlight Syntax in the 
  975.   Preferences menu. If NEdit recognizes the computer language that you are 
  976.   using, and highlighting rules (patterns) are available for that language, it 
  977.   will highlight your text, and maintain the highlighting, automatically, as 
  978.   you type. 
  979.  
  980.   If NEdit doesn't correctly recognize the type of the file you are editing, 
  981.   you can manually select a language mode from Language Modes in the 
  982.   Preferences menu. You can also program the method that NEdit uses to 
  983.   recognize language modes in Preferences -> Default Settings -> Language 
  984.   Modes.... 
  985.  
  986.   If no highlighting patterns are available for the language that you want to 
  987.   use, you can create new patterns relatively quickly. The Help section 
  988.   "Highlighting Patterns" under "Customizing", has details. 
  989.  
  990.   If you are satisfied with what NEdit is highlighting, but would like it to 
  991.   use different colors or fonts, you can change these by selecting Preferences 
  992.   -> Default Settings -> Syntax Highlighting -> Text Drawing Styles. 
  993.   Highlighting patterns are connected with font and color information through 
  994.   a common set of styles so that colorings defined for one language will be 
  995.   similar across others, and patterns within the same language which are meant 
  996.   to appear identical can be changed in the same place. To understand which 
  997.   styles are used to highlight the language you are interested in, you may 
  998.   need to look at "Highlighting Patterns" section, as well. 
  999.  
  1000.   Syntax highlighting is CPU intensive, and under some circumstances can 
  1001.   affect NEdit's responsiveness. If you have a particularly slow system, or 
  1002.   work with very large files, you may not want to use it all of the time. 
  1003.   Syntax highlighting introduces two kinds of delays. The first is an initial 
  1004.   parsing delay, proportional to the size of the file. This delay is also 
  1005.   incurred when pasting large sections of text, filtering text through shell 
  1006.   commands, and other circumstances involving changes to large amounts of 
  1007.   text. The second kind of delay happens when text which has not previously 
  1008.   been visible is scrolled in to view. Depending on your system, and the 
  1009.   highlight patterns you are using, this may or may not be noticeable. A 
  1010.   typing delay is also possible, but unlikely if you are only using the 
  1011.   built-in patterns. 
  1012.  
  1013. ----------------------------
  1014. FINDING DECLARATIONS (CTAGS)
  1015. ----------------------------
  1016.  
  1017.   NEdit can process tags files generated using the Unix ctags command or the 
  1018.   Exuberant Ctags program. Ctags creates index files correlating names of 
  1019.   functions and declarations with their locations in C, Fortran, or Pascal 
  1020.   source code files. (See the ctags manual page for more information). Ctags 
  1021.   produces a file called "tags" which can be loaded by NEdit. NEdit can manage 
  1022.   any number of tags files simultaneously. Tag collisions are handled with a 
  1023.   popup menu to let the user decide which tag to use. In 'Smart' mode NEdit 
  1024.   will automatically choose the desired tag based on the scope of the file or 
  1025.   module. Once loaded, the information in the tags file enables NEdit to go 
  1026.   directly to the declaration of a highlighted function or data structure name 
  1027.   with a single command. To load a tags file, select "Load Tags File" from the 
  1028.   File menu and choose a tags file to load, or specify the name of the tags 
  1029.   file on the NEdit command line: 
  1030.  
  1031.       nedit -tags tags
  1032.  
  1033.   NEdit can also be set to load a tags file automatically when it starts up. 
  1034.   Setting the X resource nedit.tagFile to the name of a tag file tells NEdit 
  1035.   to look for that file at startup time (see "Customizing NEdit"). The file 
  1036.   name can be either a complete path name, in which case NEdit will always 
  1037.   load the same tags file, or a file name without a path or with a relative 
  1038.   path, in which case NEdit will load it starting from the current directory. 
  1039.   The second option allows you to have different tags files for different 
  1040.   projects, each automatically loaded depending on the directory you're in 
  1041.   when you start NEdit. Setting the name to "tags" is an obvious choice since 
  1042.   this is the name that ctags uses. NEdit normally evaluates relative path tag 
  1043.   file specifications every time a file is opened. All accessible tag files 
  1044.   are loaded at this time. To disable the automatic loading of tag files 
  1045.   specified as relative paths, set the X resource 
  1046.   nedit.alwaysCheckRelativeTagsSpecs to False. 
  1047.  
  1048.   To unload a tags file, select "Un-load Tags File" from the File menu and 
  1049.   choose from the list of tags files. NEdit will keep track of tags file 
  1050.   updates by checking the timestamp on the files, and automatically update the 
  1051.   tags cache. 
  1052.  
  1053.   To find the definition of a function or data structure once a tags file is 
  1054.   loaded, select the name anywhere it appears in your program (see "Selecting 
  1055.   Text") and choose "Find Definition" from the Search menu. 
  1056.  
  1057. ===================
  1058. REGULAR EXPRESSIONS
  1059. ===================
  1060.  
  1061. -------------------------------
  1062. BASIC REGULAR EXPRESSION SYNTAX
  1063. -------------------------------
  1064.  
  1065.   Regular expressions (regex's) are useful as a way to match inexact sequences 
  1066.   of characters. They can be used in the `Find...' and `Replace...' search 
  1067.   dialogs and are at the core of Color Syntax Highlighting patterns. To 
  1068.   specify a regular expression in a search dialog, simply click on the 
  1069.   `Regular Expression' radio button in the dialog. 
  1070.  
  1071.   A regex is a specification of a pattern to be matched in the searched text. 
  1072.   This pattern consists of a sequence of tokens, each being able to match a 
  1073.   single character or a sequence of characters in the text, or assert that a 
  1074.   specific position within the text has been reached (the latter is called an 
  1075.   anchor.) Tokens (also called atoms) can be modified by adding one of a 
  1076.   number of special quantifier tokens immediately after the token. A 
  1077.   quantifier token specifies how many times the previous token must be matched 
  1078.   (see below.) 
  1079.  
  1080.   Tokens can be grouped together using one of a number of grouping constructs, 
  1081.   the most common being plain parentheses. Tokens that are grouped in this way 
  1082.   are also collectively considered to be a regex atom, since this new larger 
  1083.   atom may also be modified by a quantifier. 
  1084.  
  1085.   A regex can also be organized into a list of alternatives by separating each 
  1086.   alternative with pipe characters, `|'. This is called alternation. A match 
  1087.   will be attempted for each alternative listed, in the order specified, until 
  1088.   a match results or the list of alternatives is exhausted (see Alternation 
  1089.   section below.) 
  1090.  
  1091.  
  1092.   THE 'ANY' CHARACTER
  1093.  
  1094.   If a dot (`.') appears in a regex, it means to match any character exactly 
  1095.   once. By default, dot will not match a newline character, but this behavior 
  1096.   can be changed (see help topic Parenthetical Constructs, under the heading, 
  1097.   Matching Newlines). 
  1098.  
  1099.  
  1100.   CHARACTER CLASSES
  1101.  
  1102.   A character class, or range, matches exactly one character of text, but the 
  1103.   candidates for matching are limited to those specified by the class. Classes 
  1104.   come in two flavors as described below: 
  1105.  
  1106.      [...]   Regular class, match only characters listed.
  1107.      [^...]  Negated class, match only characters NOT listed.
  1108.  
  1109.   As with the dot token, by default negated character classes do not match 
  1110.   newline, but can be made to do so. 
  1111.  
  1112.   The characters that are considered special within a class specification are 
  1113.   different than the rest of regex syntax as follows. If the first character 
  1114.   in a class is the `]' character (second character if the first character is 
  1115.   `^') it is a literal character and part of the class character set. This 
  1116.   also applies if the first or last character is `-'. Outside of these rules, 
  1117.   two characters separated by `-' form a character range which includes all 
  1118.   the characters between the two characters as well. For example, `[^f-j]' is 
  1119.   the same as `[^fghij]' and means to match any character that is not `f', 
  1120.   `g', `h', `i', or `j'. 
  1121.  
  1122.  
  1123.   ANCHORS
  1124.  
  1125.   Anchors are assertions that you are at a very specific position within the 
  1126.   search text. NEdit regular expressions support the following anchor tokens: 
  1127.  
  1128.      ^    Beginning of line
  1129.      $    End of line
  1130.      <    Left word boundary
  1131.      >    Right word boundary
  1132.      \B   Not a word boundary
  1133.  
  1134.   Note that the \B token ensures that the left and right characters are both 
  1135.   delimiter characters, or that both left and right characters are 
  1136.   non-delimiter characters. Currently word anchors check only one character, 
  1137.   e.g. the left word anchor `<' only asserts that the left character is a word 
  1138.   delimiter character. Similarly the right word anchor checks the right 
  1139.   character. 
  1140.  
  1141.  
  1142.   QUANTIFIERS
  1143.  
  1144.   Quantifiers specify how many times the previous regular expression atom may 
  1145.   be matched in the search text. Some quantifiers can produce a large 
  1146.   performance penalty, and can in some instances completely lock up NEdit. To 
  1147.   prevent this, avoid nested quantifiers, especially those of the maximal 
  1148.   matching type (see below.) 
  1149.  
  1150.   The following quantifiers are maximal matching, or "greedy", in that they 
  1151.   match as much text as possible. 
  1152.  
  1153.      *   Match zero or more
  1154.      +   Match one  or more
  1155.      ?   Match zero or one
  1156.  
  1157.   The following quantifiers are minimal matching, or "lazy", in that they 
  1158.   match as little text as possible. 
  1159.  
  1160.      *?   Match zero or more
  1161.      +?   Match one  or more
  1162.      ??   Match zero or one
  1163.  
  1164.   One final quantifier is the counting quantifier, or brace quantifier. It 
  1165.   takes the following basic form: 
  1166.  
  1167.      {min,max}  Match from `min' to `max' times the
  1168.                 previous regular expression atom.
  1169.  
  1170.   If `min' is omitted, it is assumed to be zero. If `max' is omitted, it is 
  1171.   assumed to be infinity. Whether specified or assumed, `min' must be less 
  1172.   than or equal to `max'. Note that both `min' and `max' are limited to 65535. 
  1173.   If both are omitted, then the construct is the same as `*'. Note that `{,}' 
  1174.   and `{}' are both valid brace constructs. A single number appearing without 
  1175.   a comma, e.g. `{3}' is short for the `{min,min}' construct, or to match 
  1176.   exactly `min' number of times. 
  1177.  
  1178.   The quantifiers `{1}' and `{1,1}' are accepted by the syntax, but are 
  1179.   optimized away since they mean to match exactly once, which is redundant 
  1180.   information. Also, for efficiency, certain combinations of `min' and `max' 
  1181.   are converted to either `*', `+', or `?' as follows: 
  1182.  
  1183.      {} {,} {0,}    *
  1184.      {1,}           +
  1185.      {,1} {0,1}     ?
  1186.  
  1187.   Note that {0} and {0,0} are meaningless and will generate an error message 
  1188.   at regular expression compile time. 
  1189.  
  1190.   Brace quantifiers can also be "lazy". For example {2,5}? would try to match 
  1191.   2 times if possible, and will only match 3, 4, or 5 times if that is what is 
  1192.   necessary to achieve an overall match. 
  1193.  
  1194.  
  1195.   ALTERNATION
  1196.  
  1197.   A series of alternative patterns to match can be specified by separating 
  1198.   them with vertical pipes, `|'. An example of alternation would be 
  1199.   `a|be|sea'. This will match `a', or `be', or `sea'. Each alternative can be 
  1200.   an arbitrarily complex regular expression. The alternatives are attempted in 
  1201.   the order specified. An empty alternative can be specified if desired, e.g. 
  1202.   `a|b|'. Since an empty alternative can match nothingness (the empty string), 
  1203.   this guarantees that the expression will match. 
  1204.  
  1205.  
  1206.   COMMENTS
  1207.  
  1208.   Comments are of the form `(?#<comment text>)' and can be inserted anywhere 
  1209.   and have no effect on the execution of the regular expression. They can be 
  1210.   handy for documenting very complex regular expressions. Note that a comment 
  1211.   begins with `(?#' and ends at the first occurrence of an ending parenthesis, 
  1212.   or the end of the regular expression... period. Comments do not recognize 
  1213.   any escape sequences. 
  1214.  
  1215. --------------
  1216. METACHARACTERS
  1217. --------------
  1218.  
  1219.  
  1220.   ESCAPING METACHARACTERS
  1221.  
  1222.   In a regular expression (regex), most ordinary characters match themselves. 
  1223.   For example, `ab%' would match anywhere `a' followed by `b' followed by `%' 
  1224.   appeared in the text. Other characters don't match themselves, but are 
  1225.   metacharacters. For example, backslash is a special metacharacter which 
  1226.   'escapes' or changes the meaning of the character following it. Thus, to 
  1227.   match a literal backslash would require a regular expression to have two 
  1228.   backslashes in sequence. NEdit provides the following escape sequences so 
  1229.   that metacharacters that are used by the regex syntax can be specified as 
  1230.   ordinary characters. 
  1231.  
  1232.      \(  \)  \-  \[  \]  \<  \>  \{  \}
  1233.      \.  \|  \^  \$  \*  \+  \?  \&  \\
  1234.  
  1235.  
  1236.   SPECIAL CONTROL CHARACTERS
  1237.  
  1238.   There are some special characters that are difficult or impossible to type. 
  1239.   Many of these characters can be constructed as a sort of metacharacter or 
  1240.   sequence by preceding a literal character with a backslash. NEdit recognizes 
  1241.   the following special character sequences: 
  1242.  
  1243.      \a  alert (bell)
  1244.      \b  backspace
  1245.      \e  ASCII escape character (***)
  1246.      \f  form feed (new page)
  1247.      \n  newline
  1248.      \r  carriage return
  1249.      \t  horizontal tab
  1250.      \v  vertical tab
  1251.  
  1252.      *** For environments that use the EBCDIC character set,
  1253.          when compiling NEdit set the EBCDIC_CHARSET compiler
  1254.          symbol to get the EBCDIC equivalent escape
  1255.          character.)
  1256.  
  1257.  
  1258.   OCTAL AND HEX ESCAPE SEQUENCES
  1259.  
  1260.   Any ASCII (or EBCDIC) character, except null, can be specified by using 
  1261.   either an octal escape or a hexadecimal escape, each beginning with \0 or \x 
  1262.   (or \X), respectively. For example, \052 and \X2A both specify the `*' 
  1263.   character. Escapes for null (\00 or \x0) are not valid and will generate an 
  1264.   error message. Also, any escape that exceeds \0377 or \xFF will either cause 
  1265.   an error or have any additional character(s) interpreted literally. For 
  1266.   example, \0777 will be interpreted as \077 (a `?' character) followed by `7' 
  1267.   since \0777 is greater than \0377. 
  1268.  
  1269.   An invalid digit will also end an octal or hexadecimal escape. For example, 
  1270.   \091 will cause an error since `9' is not within an octal escape's range of 
  1271.   allowable digits (0-7) and truncation before the `9' yields \0 which is 
  1272.   invalid. 
  1273.  
  1274.  
  1275.   SHORTCUT ESCAPE SEQUENCES
  1276.  
  1277.   NEdit defines some escape sequences that are handy shortcuts for commonly 
  1278.   used character classes. 
  1279.  
  1280.    \d  digits            0-9
  1281.    \l  letters           a-z, A-Z, and locale dependent letters
  1282.    \s  whitespace        \t, \r, \v, \f, and space
  1283.    \w  word characters   letters, digits, and underscore, `_'
  1284.  
  1285.   \D, \L, \S, and \W are the same as the lowercase versions except that the 
  1286.   resulting character class is negated. For example, \d is equivalent to 
  1287.   `[0-9]', while \D is equivalent to `[^0-9]'. 
  1288.  
  1289.   These escape sequences can also be used within a character class. For 
  1290.   example, `[\l_]' is the same as `[a-zA-Z_]', extended with possible locale 
  1291.   dependent letters. The escape sequences for special characters, and octal 
  1292.   and hexadecimal escapes are also valid within a class. 
  1293.  
  1294.  
  1295.   WORD DELIMITER TOKENS
  1296.  
  1297.   Although not strictly a character class, the following escape sequences 
  1298.   behave similarly to character classes: 
  1299.  
  1300.      \y   Word delimiter character
  1301.      \Y   Not a word delimiter character
  1302.  
  1303.   The `\y' token matches any single character that is one of the characters 
  1304.   that NEdit recognizes as a word delimiter character, while the `\Y' token 
  1305.   matches any character that is NOT a word delimiter character. Word delimiter 
  1306.   characters are dynamic in nature, meaning that the user can change them 
  1307.   through preference settings. For this reason, they must be handled 
  1308.   differently by the regular expression engine. As a consequence of this, `\y' 
  1309.   and `\Y' can not be used within a character class specification. 
  1310.  
  1311. ------------------------
  1312. PARENTHETICAL CONSTRUCTS
  1313. ------------------------
  1314.  
  1315.  
  1316.   CAPTURING PARENTHESES
  1317.  
  1318.   Capturing Parentheses are of the form `(<regex>)' and can be used to group 
  1319.   arbitrarily complex regular expressions. Parentheses can be nested, but the 
  1320.   total number of parentheses, nested or otherwise, is limited to 50 pairs. 
  1321.   The text that is matched by the regular expression between a matched set of 
  1322.   parentheses is captured and available for text substitutions and 
  1323.   backreferences (see below.) Capturing parentheses carry a fairly high 
  1324.   overhead both in terms of memory used and execution speed, especially if 
  1325.   quantified by `*' or `+'. 
  1326.  
  1327.  
  1328.   NON-CAPTURING PARENTHESES
  1329.  
  1330.   Non-Capturing Parentheses are of the form `(?:<regex>)' and facilitate 
  1331.   grouping only and do not incur the overhead of normal capturing parentheses. 
  1332.   They should not be counted when determining numbers for capturing 
  1333.   parentheses which are used with backreferences and substitutions. Because of 
  1334.   the limit on the number of capturing parentheses allowed in a regex, it is 
  1335.   advisable to use non-capturing parentheses when possible. 
  1336.  
  1337.  
  1338.   POSITIVE LOOK-AHEAD
  1339.  
  1340.   Positive look-ahead constructs are of the form `(?=<regex>)' and implement a 
  1341.   zero width assertion of the enclosed regular expression. In other words, a 
  1342.   match of the regular expression contained in the positive look-ahead 
  1343.   construct is attempted. If it succeeds, control is passed to the next 
  1344.   regular expression atom, but the text that was consumed by the positive 
  1345.   look-ahead is first unmatched (backtracked) to the place in the text where 
  1346.   the positive look-ahead was first encountered. 
  1347.  
  1348.   One application of positive look-ahead is the manual implementation of a 
  1349.   first character discrimination optimization. You can include a positive 
  1350.   look-ahead that contains a character class which lists every character that 
  1351.   the following (potentially complex) regular expression could possibly start 
  1352.   with. This will quickly filter out match attempts that can not possibly 
  1353.   succeed. 
  1354.  
  1355.  
  1356.   NEGATIVE LOOK-AHEAD
  1357.  
  1358.   Negative look-ahead takes the form `(?!<regex>)' and is exactly the same as 
  1359.   positive look-ahead except that the enclosed regular expression must NOT 
  1360.   match. This can be particularly useful when you have an expression that is 
  1361.   general, and you want to exclude some special cases. Simply precede the 
  1362.   general expression with a negative look-ahead that covers the special cases 
  1363.   that need to be filtered out. 
  1364.  
  1365.  
  1366.   CASE SENSITIVITY
  1367.  
  1368.   There are two parenthetical constructs that control case sensitivity: 
  1369.  
  1370.      (?i<regex>)   Case insensitive; `AbcD' and `aBCd' are
  1371.                    equivalent.
  1372.  
  1373.      (?I<regex>)   Case sensitive;   `AbcD' and `aBCd' are
  1374.                    different.
  1375.  
  1376.   Regular expressions are case sensitive by default, that is, `(?I<regex>)' is 
  1377.   assumed. All regular expression token types respond appropriately to case 
  1378.   insensitivity including character classes and backreferences. There is some 
  1379.   extra overhead involved when case insensitivity is in effect, but only to 
  1380.   the extent of converting each character compared to lower case. 
  1381.  
  1382.  
  1383.   MATCHING NEWLINES
  1384.  
  1385.   NEdit regular expressions by default handle the matching of newlines in a 
  1386.   way that should seem natural for most editing tasks. There are situations, 
  1387.   however, that require finer control over how newlines are matched by some 
  1388.   regular expression tokens. 
  1389.  
  1390.   By default, NEdit regular expressions will NOT match a newline character for 
  1391.   the following regex tokens: dot (`.'); a negated character class (`[^...]'); 
  1392.   and the following shortcuts for character classes: 
  1393.  
  1394.      `\d', `\D', `\l', `\L', `\s', `\S', `\w', `\W', `\Y'
  1395.  
  1396.   The matching of newlines can be controlled for the `.' token, negated 
  1397.   character classes, and the `\s' and `\S' shortcuts by using one of the 
  1398.   following parenthetical constructs: 
  1399.  
  1400.      (?n<regex>)  `.', `[^...]', `\s', `\S' match newlines
  1401.  
  1402.      (?N<regex>)  `.', `[^...]', `\s', `\S' don't match
  1403.                                             newlines
  1404.  
  1405.   `(?N<regex>)' is the default behavior. 
  1406.  
  1407.  
  1408.   NOTES ON NEW PARENTHETICAL CONSTRUCTS
  1409.  
  1410.   Except for plain parentheses, none of the parenthetical constructs capture 
  1411.   text. If that is desired, the construct must be wrapped with capturing 
  1412.   parentheses, e.g. `((?i<regex))'. 
  1413.  
  1414.   All parenthetical constructs can be nested as deeply as desired, except for 
  1415.   capturing parentheses which have a limit of 50 sets of parentheses, 
  1416.   regardless of nesting level. 
  1417.  
  1418.  
  1419.   BACK REFERENCES
  1420.  
  1421.   Backreferences allow you to match text captured by a set of capturing 
  1422.   parenthesis at some later position in your regular expression. A 
  1423.   backreference is specified using a single backslash followed by a single 
  1424.   digit from 1 to 9 (example: \3). Backreferences have similar syntax to 
  1425.   substitutions (see below), but are different from substitutions in that they 
  1426.   appear within the regular expression, not the substitution string. The 
  1427.   number specified with a backreference identifies which set of text capturing 
  1428.   parentheses the backreference is associated with. The text that was most 
  1429.   recently captured by these parentheses is used by the backreference to 
  1430.   attempt a match. As with substitutions, open parentheses are counted from 
  1431.   left to right beginning with 1. So the backreference `\3' will try to match 
  1432.   another occurrence of the text most recently matched by the third set of 
  1433.   capturing parentheses. As an example, the regular expression `(\d)\1' could 
  1434.   match `22', `33', or `00', but wouldn't match `19' or `01'. 
  1435.  
  1436.   A backreference must be associated with a parenthetical expression that is 
  1437.   complete. The expression `(\w(\1))' contains an invalid backreference since 
  1438.   the first set of parentheses are not complete at the point where the 
  1439.   backreference appears. 
  1440.  
  1441.  
  1442.   SUBSTITUTION
  1443.  
  1444.   Substitution strings are used to replace text matched by a set of capturing 
  1445.   parentheses. The substitution string is mostly interpreted as ordinary text 
  1446.   except as follows. 
  1447.  
  1448.   The escape sequences described above for special characters, and octal and 
  1449.   hexadecimal escapes are treated the same way by a substitution string. When 
  1450.   the substitution string contains the `&' character, NEdit will substitute 
  1451.   the entire string that was matched by the `Find...' operation. Any of the 
  1452.   first nine sub-expressions of the match string can also be inserted into the 
  1453.   replacement string. This is done by inserting a `\' followed by a digit from 
  1454.   1 to 9 that represents the string matched by a parenthesized expression 
  1455.   within the regular expression. These expressions are numbered left-to-right 
  1456.   in order of their opening parentheses. 
  1457.  
  1458.   The capitalization of text inserted by `&' or `\1', `\2', ... `\9' can be 
  1459.   altered by preceding them with `\U', `\u', `\L', or `\l'. `\u' and `\l' 
  1460.   change only the first character of the inserted entity, while `\U' and `\L' 
  1461.   change the entire entity to upper or lower case, respectively. 
  1462.  
  1463. ---------------
  1464. ADVANCED TOPICS
  1465. ---------------
  1466.  
  1467.  
  1468.   SUBSTITUTIONS
  1469.  
  1470.   Regular expression substitution can be used to program automatic editing 
  1471.   operations. For example, the following are search and replace strings to 
  1472.   find occurrences of the `C' language subroutine `get_x', reverse the first 
  1473.   and second parameters, add a third parameter of NULL, and change the name to 
  1474.   `new_get_x': 
  1475.  
  1476.      Search string:   `get_x *\( *([^ ,]*), *([^\)]*)\)'
  1477.      Replace string:  `new_get_x(\2, \1, NULL)'
  1478.  
  1479.  
  1480.   AMBIGUITY
  1481.  
  1482.   If a regular expression could match two different parts of the text, it will 
  1483.   match the one which begins earliest. If both begin in the same place but 
  1484.   match different lengths, or match the same length in different ways, life 
  1485.   gets messier, as follows. 
  1486.  
  1487.   In general, the possibilities in a list of alternatives are considered in 
  1488.   left-to-right order. The possibilities for `*', `+', and `?' are considered 
  1489.   longest-first, nested constructs are considered from the outermost in, and 
  1490.   concatenated constructs are considered leftmost-first. The match that will 
  1491.   be chosen is the one that uses the earliest possibility in the first choice 
  1492.   that has to be made. If there is more than one choice, the next will be made 
  1493.   in the same manner (earliest possibility) subject to the decision on the 
  1494.   first choice. And so forth. 
  1495.  
  1496.   For example, `(ab|a)b*c' could match `abc' in one of two ways. The first 
  1497.   choice is between `ab' and `a'; since `ab' is earlier, and does lead to a 
  1498.   successful overall match, it is chosen. Since the `b' is already spoken for, 
  1499.   the `b*' must match its last possibility, the empty string, since it must 
  1500.   respect the earlier choice. 
  1501.  
  1502.   In the particular case where no `|'s are present and there is only one `*', 
  1503.   `+', or `?', the net effect is that the longest possible match will be 
  1504.   chosen. So `ab*', presented with `xabbbby', will match `abbbb'. Note that if 
  1505.   `ab*' is tried against `xabyabbbz', it will match `ab' just after `x', due 
  1506.   to the begins-earliest rule. (In effect, the decision on where to start the 
  1507.   match is the first choice to be made, hence subsequent choices must respect 
  1508.   it even if this leads them to less-preferred alternatives.) 
  1509.  
  1510.  
  1511.   REFERENCES
  1512.  
  1513.   An excellent book on the care and feeding of regular expressions is 
  1514.  
  1515.           "Mastering Regular Expressions"
  1516.           Jeffrey E. F. Friedl
  1517.           (c) 1997, O'Reilly & Associates
  1518.           ISBN 1-56592-257-3
  1519.  
  1520. ---------------------------
  1521. EXAMPLE REGULAR EXPRESSIONS
  1522. ---------------------------
  1523.  
  1524.   The following are regular expression examples which will match: 
  1525.  
  1526.     * An entire line.
  1527.         ^.*$
  1528.  
  1529.     * Blank lines.
  1530.         ^$
  1531.  
  1532.     * Whitespace on a line.
  1533.         \s+
  1534.  
  1535.     * Whitespace across lines.
  1536.         (?n\s+)
  1537.  
  1538.     * Whitespace that spans at least two lines. Note minimal matching `*?' quantifier.
  1539.         (?n\s*?\n\s*)
  1540.  
  1541.     * IP address (not robust).
  1542.         (?:\d{1,3}(?:\.\d{1,3}){3})
  1543.  
  1544.     * Two character US Postal state abbreviations (includes territories).
  1545.         [ACDF-IK-PR-W][A-Z]
  1546.  
  1547.     * Web addresses.
  1548.         (?:http://)?www\.\S+
  1549.  
  1550.     * Case insensitive double words across line breaks.
  1551.         (?i(?n<(\S+)\s+\1>))
  1552.  
  1553.     * Upper case words with possible punctuation.
  1554.         <[A-Z][^a-z\s]*>
  1555.  
  1556. ======================
  1557. MACRO/SHELL EXTENSIONS
  1558. ======================
  1559.  
  1560. --------------------------
  1561. SHELL COMMANDS AND FILTERS
  1562. --------------------------
  1563.  
  1564.   The Shell menu (Unix versions only) allows you to execute Unix shell 
  1565.   commands from within NEdit. You can add items to the menu to extend NEdit's 
  1566.   command set or to incorporate custom automatic editing features using shell 
  1567.   commands or editing languages like awk and sed. To add items to the menu, 
  1568.   select Preferences -> Default Settings Customize Menus -> Shell Menu. NEdit 
  1569.   comes pre-configured with a few useful Unix commands like spell and sort, 
  1570.   but we encourage you to add your own custom extensions. 
  1571.  
  1572.   Filter Selection... prompts you for a Unix command to use to process the 
  1573.   currently selected text. The output from this command replaces the contents 
  1574.   of the selection. 
  1575.  
  1576.   Execute Command... prompts you for a Unix command and replaces the current 
  1577.   selection with the output of the command. If there is no selection, it 
  1578.   deposits the output at the current insertion point. In the Shell Command 
  1579.   field, the % character expands to the name (including directory path), and 
  1580.   the # character expands to the current line number of the file in the 
  1581.   window. To include a % or # character in the command, use %% or ##, 
  1582.   respectively. 
  1583.  
  1584.   Execute Command Line uses the position of the cursor in the window to 
  1585.   indicate a line to execute as a shell command line. The cursor may be 
  1586.   positioned anywhere on the line. This command allows you to use an NEdit 
  1587.   window as an editable command window for saving output and saving commands 
  1588.   for re-execution. Note that the same character expansions described above in 
  1589.   Execute Command also occur with this command. 
  1590.  
  1591.   The X resource called nedit.shell (See "Customizing NEdit") determines which 
  1592.   Unix shell is used to execute commands. The default value for this resource 
  1593.   is /bin/csh. 
  1594.  
  1595. ------------
  1596. LEARN/REPLAY
  1597. ------------
  1598.  
  1599.   Selecting Learn Keystrokes from the Macro menu puts NEdit in learn mode. In 
  1600.   learn mode, keystrokes and menu commands are recorded, to be played back 
  1601.   later, using the Replay Keystrokes command, or pasted into a macro in the 
  1602.   Macro Commands dialog of the Default Settings menu in Preferences. 
  1603.  
  1604.   Note that only keyboard and menu commands are recorded, not mouse clicks or 
  1605.   mouse movements since these have no absolute point of reference, such as 
  1606.   cursor or selection position. When you do a mouse-based operation in learn 
  1607.   mode, NEdit will beep (repeatedly) to remind you that the operation was not 
  1608.   recorded. 
  1609.  
  1610.   Learn mode is also the quickest and easiest method for writing macros. The 
  1611.   dialog for creating macro commands contains a button labeled "Paste Learn / 
  1612.   Replay Macro", which will deposit the last sequence learned into the body of 
  1613.   the macro. 
  1614.  
  1615.  
  1616.   REPEATING ACTIONS AND LEARN/REPLAY SEQUENCES
  1617.  
  1618.   You can repeat the last (keyboard-based) command, or learn/replay sequence 
  1619.   with the Repeat... command in the Macro menu. To repeat an action, first do 
  1620.   the action (that is, insert a character, do a search, move the cursor), then 
  1621.   select Repeat..., decide how or how many times you want it repeated, and 
  1622.   click OK. For example, to move down 30 lines through a file, you could type: 
  1623.   <Down Arrow> Ctrl+, 29 <Return>. To repeat a learn/replay sequence, first 
  1624.   learn it, then select Repeat..., click on Learn/Replay and how you want it 
  1625.   repeated, then click OK. 
  1626.  
  1627.   If the commands you are repeating advance the cursor through the file, you 
  1628.   can also repeat them within a range of characters, or from the current 
  1629.   cursor position to the end of the file. To iterate over a range of 
  1630.   characters, use the primary selection (drag the left mouse button over the 
  1631.   text) to mark the range you want to operate on, and select "In Selection" in 
  1632.   the Repeat dialog. 
  1633.  
  1634.   When using In "Selection" or "To End" with a learned sequence, try to do 
  1635.   cursor movement as the last step in the sequence, since testing of the 
  1636.   cursor position is only done at the end of the sequence execution. If you do 
  1637.   cursor movement first, for example searching for a particular word then 
  1638.   doing a modification, the position of the cursor won't be checked until the 
  1639.   sequence has potentially gone far beyond the end of your desired range. 
  1640.  
  1641.   It's easy for a repeated command to get out of hand, and you can easily 
  1642.   generate an infinite loop by using range iteration on a command which 
  1643.   doesn't progress. To cancel a repeating command in progress, type Ctrl+. 
  1644.   (period), or select Cancel Macro from the Macro menu. 
  1645.  
  1646. --------------
  1647. MACRO LANGUAGE
  1648. --------------
  1649.  
  1650.   Macros can be called from Macro menu commands, window background menu 
  1651.   commands, within the smart-indent framework, and from the .neditmacro file. 
  1652.   Macro menu and window background menu commands are defined under Preferences 
  1653.   -> Default Settings -> Customize Menus. Help on creating items in these 
  1654.   menus can be found in the section, Help -> Customizing -> Preferences. The 
  1655.   .neditmacro file is a file of macro commands and definitions which you can 
  1656.   create in your home directory, and which NEdit will automatically load when 
  1657.   it is first started. 
  1658.  
  1659.   NEdit's macro language is a simple interpreter with integer arithmetic, 
  1660.   dynamic strings, and C-style looping constructs (very similar to the 
  1661.   procedural portion of the Unix awk program). From the macro language, you 
  1662.   can call the same action routines which are bound to keyboard keys and menu 
  1663.   items, as well additional subroutines for accessing and manipulating editor 
  1664.   data, which are specific to the macro language (these are listed in the 
  1665.   sections titled "Macro Subroutines", and "Action_Routines_"). 
  1666.  
  1667.  
  1668.   SYNTAX
  1669.  
  1670.   An NEdit macro language program consists of a list of statements, each 
  1671.   terminated by a newline. Groups of statements which are executed together 
  1672.   conditionally, such as the body of a loop, are surrounded by curly braces 
  1673.   "{}". 
  1674.  
  1675.   Blank lines and comments are also allowed. Comments begin with a "#" and end 
  1676.   with a newline, and can appear either on a line by themselves, or at the end 
  1677.   of a statement. 
  1678.  
  1679.   Statements which are too long to fit on a single line may be split across 
  1680.   several lines, by placing a backslash "\" character at the end of each line 
  1681.   to be continued. 
  1682.  
  1683.  
  1684.   DATA TYPES
  1685.  
  1686.   The NEdit macro language recognizes only three data types, dynamic character 
  1687.   strings, integer values and associative arrays. In general strings and 
  1688.   integers can be used interchangeably. If a string represents an integer 
  1689.   value, it can be used as an integer. Integers can be compared and 
  1690.   concatenated with strings. Arrays may contain integers, strings, or arrays. 
  1691.   Arrays are stored key/value pairs. Keys are always stored as strings. 
  1692.  
  1693.  
  1694.   Integer Constants
  1695.  
  1696.   Integers are non-fractional numbers in the range of -2147483647 to 
  1697.   2147483647. Integer constants must be in decimal. For example: 
  1698.  
  1699.     a = -1
  1700.     b = 1000
  1701.  
  1702.  
  1703.   Character String Constants
  1704.  
  1705.   Character string constants are enclosed in double quotes. For example: 
  1706.  
  1707.      a = "a string"
  1708.      dialog("Hi there!", "Dismiss")
  1709.  
  1710.   Strings may also include C-language style escape sequences: 
  1711.  
  1712.      \\ Backslash     \t Tab              \f Form feed
  1713.      \" Double quote  \b Backspace        \a Alert
  1714.      \n Newline       \r Carriage return  \v Vertical tab
  1715.  
  1716.   For example, to send output to the terminal from which NEdit was started, a 
  1717.   newline character is necessary because, like printf, t_print requires 
  1718.   explicit newlines, and also buffers its output on a per-line basis: 
  1719.  
  1720.      t_print("a = " a "\n")
  1721.  
  1722.  
  1723.   VARIABLES
  1724.  
  1725.   Variable names must begin either with a letter (local variables), or a $ 
  1726.   (global variables). Beyond the first character, variables may also contain 
  1727.   numbers and underscores `_'. Variables are called in to existence just by 
  1728.   setting them (no explicit declarations are necessary). 
  1729.  
  1730.   Local variables are limited in scope to the subroutine (or menu item 
  1731.   definition) in which they appear. Global variables are accessible from all 
  1732.   routines, and their values persist beyond the call which created them, until 
  1733.   reset. 
  1734.  
  1735.  
  1736.   Built-in Variables
  1737.  
  1738.   NEdit has a number of permanently defined variables, which are used to 
  1739.   access global editor information and information about the the window in 
  1740.   which the macro is executing. These are listed along with the built in 
  1741.   functions in the section titled "Macro Subroutines". 
  1742.  
  1743.  
  1744.   FUNCTIONS AND SUBROUTINES
  1745.  
  1746.   The syntax of a function or subroutine call is: 
  1747.  
  1748.      function_name(arg1, arg2, ...)
  1749.  
  1750.   where arg1, arg2, etc. represent up to 9 argument values which are passed to 
  1751.   the routine being called. A function or subroutine call can be on a line by 
  1752.   itself, as above, or if it returns a value, can be invoked within a 
  1753.   character or numeric expression: 
  1754.  
  1755.      a = fn1(b, c) + fn2(d)
  1756.      dialog("fn3 says: " fn3())
  1757.  
  1758.   Arguments are passed by value. This means that you can not return values via 
  1759.   the argument list, only through the function value or indirectly through 
  1760.   agreed-upon global variables. 
  1761.  
  1762.  
  1763.   Built-in Functions
  1764.  
  1765.   NEdit has a wide range of built in functions which can be called from the 
  1766.   macro language. These routines are divided into two classes, macro-language 
  1767.   functions, and editor action routines. Editor action routines are more 
  1768.   flexible, in that they may be called either from the macro language, or 
  1769.   bound directly to keys via translation tables. They are also limited, 
  1770.   however, in that they can not return values. Macro language routines can 
  1771.   return values, but can not be bound to keys in translation tables. 
  1772.  
  1773.   Nearly all of the built-in subroutines operate on an implied window, which 
  1774.   is initially the window from which the macro was started. To manipulate the 
  1775.   contents of other windows, use the focus_window subroutine to change the 
  1776.   focus to the ones you wish to modify. focus_window can also be used to 
  1777.   iterate over all of the currently open windows, using the special keyword 
  1778.   names, "last" and "next". 
  1779.  
  1780.   For backwards compatibility, hyphenated action routine names are allowed, 
  1781.   and most of the existing action routines names which contain underscores 
  1782.   have an equivalent version containing hyphens ('-') instead of underscores. 
  1783.   Use of these names is discouraged. The macro parser resolves the ambiguity 
  1784.   between '-' as the subtraction/negation operator, and - as part of an action 
  1785.   routine name by assuming subtraction unless the symbol specifically matches 
  1786.   an action routine name. 
  1787.  
  1788.  
  1789.   User Defined Functions
  1790.  
  1791.   Users can define their own macro subroutines, using the define keyword: 
  1792.  
  1793.      define subroutine_name {
  1794.         < body of subroutine >
  1795.      }
  1796.  
  1797.   Macro definitions can not appear within other definitions, or within macro 
  1798.   menu item definitions (usually they are found in the .neditmacro file). 
  1799.  
  1800.   The arguments with which a user-defined subroutine or function was invoked, 
  1801.   are presented as $1, $2, ... , $9. The number of arguments can be read from 
  1802.   $n_args. 
  1803.  
  1804.   To return a value from a subroutine, and/or to exit from the subroutine 
  1805.   before the end of the subroutine body, use the return statement: 
  1806.  
  1807.      return <value to return>
  1808.  
  1809.  
  1810.   OPERATORS AND EXPRESSIONS
  1811.  
  1812.   Operators have the same meaning and precedence that they do in C, except for 
  1813.   ^, which raises a number to a power (y^x means y to the x power), rather 
  1814.   than bitwise exclusive OR. The table below lists operators in decreasing 
  1815.   order of precedence. 
  1816.  
  1817.      Operators                Associativity
  1818.      ()
  1819.      ^                        right to left
  1820.      - ! ++ --                (unary)
  1821.      * / %                    left to right
  1822.      + -                      left to right
  1823.      > >= < <= == !=          left to right
  1824.      &                        left to right
  1825.      |                        left to right
  1826.      &&                       left to right
  1827.      ||                       left to right
  1828.      (concatenation)          left to right
  1829.      = += -= *= /= %=, &= |=  right to left
  1830.  
  1831.   The order in which operands are evaluated in an expression is undefined, 
  1832.   except for && and ||, which like C, evaluate operands left to right, but 
  1833.   stop when further evaluation would no longer change the result. 
  1834.  
  1835.  
  1836.   Numerical Operators
  1837.  
  1838.   The numeric operators supported by the NEdit macro language are listed 
  1839.   below: 
  1840.  
  1841.      + addition
  1842.      - subtraction or negation
  1843.      * multiplication
  1844.      / division
  1845.      % modulo
  1846.      ^ power
  1847.      & bitwise and
  1848.      | bitwise or
  1849.  
  1850.   Increment (++) and decrement (--) operators can also be appended or 
  1851.   prepended to variables within an expression. Prepended increment/decrement 
  1852.   operators act before the variable is evaluated. Appended increment/decrement 
  1853.   operators act after the variable is evaluated. 
  1854.  
  1855.  
  1856.   Logical and Comparison Operators
  1857.  
  1858.   Logical operations produce a result of 0 (for false) or 1 (for true). In a 
  1859.   logical operation, any non-zero value is recognized to mean true. The 
  1860.   logical and comparison operators allowed in the NEdit macro language are 
  1861.   listed below: 
  1862.  
  1863.      && logical and
  1864.      || logical or
  1865.      !  not
  1866.      >  greater
  1867.      <  less
  1868.      >= greater or equal
  1869.      <= less or equal
  1870.      == equal (integers and/or strings)
  1871.      != not equal (integers and/or strings)
  1872.  
  1873.  
  1874.   Character String Operators
  1875.  
  1876.   The "operator" for concatenating two strings is the absence of an operator. 
  1877.   Adjoining character strings with no operator in between means concatenation: 
  1878.  
  1879.      d = a b "string" c
  1880.      t_print("the value of a is: " a)
  1881.  
  1882.   Comparison between character strings is done with the == and != operators, 
  1883.   (as with integers). There are a number of useful built-in routines for 
  1884.   working with character strings, which are listed in the section called 
  1885.   "Macro Subroutines". 
  1886.  
  1887.  
  1888.   Arrays and Array Operators
  1889.  
  1890.   Arrays may contain either strings, integers, or other arrays. Arrays are 
  1891.   associative, which means that they relate two pieces of information, the key 
  1892.   and the value. The key is always a string; if you use integers they are 
  1893.   converted to strings. 
  1894.  
  1895.   To determine if a given key is in an array, use the in keyword. 
  1896.  
  1897.       if ("6" in x)
  1898.           <body>
  1899.  
  1900.   If the left side of the in keyword is an array, the result is true if every 
  1901.   key in the left array is in the right array. Array values are not compared. 
  1902.  
  1903.   To iterate through all the keys of an array use the for looping construct. 
  1904.   Keys are not guaranteed in any particular order: 
  1905.  
  1906.       for (aKey in x)
  1907.           <body>
  1908.  
  1909.   Elements can be removed from an array using the delete command: 
  1910.  
  1911.       delete x[3] # deletes element with key 3
  1912.       delete x[]  # deletes all elements
  1913.  
  1914.   The number of elements in an array can be determined by referencing the 
  1915.   array with no indices: 
  1916.  
  1917.       dialog("array x has " x[] " elements", "OK")
  1918.  
  1919.   Arrays can be combined with some operators. All the following operators only 
  1920.   compare the keys of the arrays. 
  1921.  
  1922.       result = x + y   (Merge arrays)
  1923.  
  1924.   The 'result' is a new array containing keys from both x and y. If duplicates 
  1925.   are present values from y are used. 
  1926.  
  1927.       result = x - y   (Remove keys)
  1928.  
  1929.   The 'result' is a new array containing all keys from x that are not in y. 
  1930.  
  1931.       result = x & y   (Common keys)
  1932.  
  1933.   The 'result' is a new array containing all keys which are in both x and y. 
  1934.   The values from y are used. 
  1935.  
  1936.       result = x | y   (Unique keys)
  1937.  
  1938.   The 'result' is a new array containing keys which exist in either x or y, 
  1939.   but not both. 
  1940.  
  1941.   When duplicate keys are encountered using the + and & operators, the values 
  1942.   from the array on the right side of the operators are used for the result. 
  1943.   All of the above operators are array only, meaning both the left and right 
  1944.   sides of the operator must be arrays. The results are also arrays. 
  1945.  
  1946.   Array keys can also contain multiple dimensions: 
  1947.  
  1948.       x[1, 1, 1] = "string"
  1949.  
  1950.   These are used in the expected way, e.g.: 
  1951.  
  1952.       for (i = 1; i < 3; i++)
  1953.       {
  1954.           for (j = 1; j < 3; j++)
  1955.           {
  1956.               x[i, j] = k++
  1957.           }
  1958.       }
  1959.  
  1960.   gives the following array: 
  1961.  
  1962.       x[1, 1] = 0
  1963.       x[1, 2] = 1
  1964.       x[2, 1] = 2
  1965.       x[2, 2] = 3
  1966.  
  1967.   Internally all indices are part of one string, separated by the string 
  1968.   $sub_sep (ASCII 0x18). The first key in the above example is in fact 
  1969.  
  1970.       ["1" $sub_sep "1"]
  1971.  
  1972.   If you need to extract one of the keys, you can use split(), using $sub_sep 
  1973.   as the separator. 
  1974.  
  1975.   You can also check for the existence of multi-dimensional array by looking 
  1976.   for $sub_sep in the key. 
  1977.  
  1978.   Last, you need $sub_sep if you want to use the 'in' keyword. 
  1979.  
  1980.       if ((1,2) in myArray)
  1981.       {..}
  1982.  
  1983.   doesn't work, but 
  1984.  
  1985.       if (("1" $sub_sep "2") in myArray)
  1986.       {..}
  1987.  
  1988.   does work. 
  1989.  
  1990.  
  1991.   LOOPING AND CONDITIONALS
  1992.  
  1993.   NEdit supports looping constructs: for and while, and conditional 
  1994.   statements: if and else, with essentially the same syntax as C: 
  1995.  
  1996.      for (<init>, ...; <condition>; <increment>, ...) <body>
  1997.  
  1998.      while (<condition>) <body>
  1999.  
  2000.      if (<condition>) <body>
  2001.  
  2002.      if (<condition>) <body> else <body>
  2003.  
  2004.   <body>, as in C, can be a single statement, or a list of statements enclosed 
  2005.   in curly braces ({}). <condition> is an expression which must evaluate to 
  2006.   true for the statements in <body> to be executed. for loops may also contain 
  2007.   initialization statements, <init>, executed once at the beginning of the 
  2008.   loop, and increment/decrement statements (or any arbitrary statement), which 
  2009.   are executed at the end of the loop, before the condition is evaluated 
  2010.   again. 
  2011.  
  2012.   Examples: 
  2013.  
  2014.     for (i=0; i<100; i++)
  2015.        j = i * 2
  2016.  
  2017.     for (i=0, j=20; i<20; i++, j--) {
  2018.        k = i * j
  2019.        t_print(i, j, k)
  2020.     }
  2021.  
  2022.     while (k > 0)
  2023.     {
  2024.        k = k - 1
  2025.        t_print(k)
  2026.     }
  2027.  
  2028.     for (;;) {
  2029.        if (i-- < 1)
  2030.            break
  2031.     }
  2032.  
  2033.   Loops may contain break and continue statements. A break statement causes an 
  2034.   exit from the innermost loop, a continue statement transfers control to the 
  2035.   end of the loop. 
  2036.  
  2037. -----------------
  2038. MACRO SUBROUTINES
  2039. -----------------
  2040.  
  2041.  
  2042.   BUILT IN VARIABLES
  2043.  
  2044.   These variables are read-only and can not be changed. 
  2045.  
  2046. $active_pane
  2047.   Index of the current pane. 
  2048.  
  2049. $auto_indent
  2050.   Contains the current preference for auto indent. Can be "off", "on" or 
  2051.   "auto". 
  2052.  
  2053. $cursor
  2054.   Position of the cursor in the current window. 
  2055.  
  2056. $column
  2057.   Column number of the cursor position in the current window. 
  2058.  
  2059. $display_width
  2060.   Width of the current pane in pixels. 
  2061.  
  2062. $em_tab_dist
  2063.   If tab emulation is turned on in the Tabs... dialog of the Preferences menu, 
  2064.   value is the distance between emulated tab stops. If tab emulation is turned 
  2065.   off, value is -1. 
  2066.  
  2067. $empty_array
  2068.   An array with no elements. This can be used to initialize an array to an 
  2069.   empty state. 
  2070.  
  2071. $file_format
  2072.   Current newline format that the file will be saved with. Can be "unix", 
  2073.   "dos" or "macintosh". 
  2074.  
  2075. $file_name
  2076.   Name of the file being edited in the current window, stripped of directory 
  2077.   component. 
  2078.  
  2079. $file_path
  2080.   Directory component of file being edited in the current window. 
  2081.  
  2082. $font_name
  2083.   Contains the current plain text font name. 
  2084.  
  2085. $font_name_bold
  2086.   Contains the current bold text font name. 
  2087.  
  2088. $font_name_bold_italic
  2089.   Contains the current bold-italic text font name. 
  2090.  
  2091. $font_name_italic
  2092.   Contains the current italic text font name. 
  2093.  
  2094. $highlight_syntax
  2095.   Whether syntax highlighting is turned on. 
  2096.  
  2097. $incremental_backup
  2098.   Contains 1 if incremental auto saving is on, otherwise 0. 
  2099.  
  2100. $incremental_search_line
  2101.   Has a value of 1 if the preference is selected to always show the 
  2102.   incremental search line, otherwise 0. 
  2103.  
  2104. $language_mode
  2105.   Name of language mode set in the current window. 
  2106.  
  2107. $line
  2108.   Line number of the cursor position in the current window. 
  2109.  
  2110. $locked
  2111.   True if the file has been locked by the user. 
  2112.  
  2113. $make_backup_copy
  2114.   Has a value of 1 if original file is kept in a backup file on save, 
  2115.   otherwise 0. 
  2116.  
  2117. $max_font_width
  2118.   The maximum font width of all the active styles. Syntax highlighting styles 
  2119.   are only considered if syntax highlighting is turned on. 
  2120.  
  2121. $min_font_width
  2122.   The minimum font width of all the active styles. Syntax highlighting styles 
  2123.   are only considered if syntax highlighting is turned on. 
  2124.  
  2125. $modified
  2126.   True if the file in the current window has been modified and the 
  2127.   modifications have not yet been saved. 
  2128.  
  2129. $n_display_lines
  2130.   The number of lines visible in the currently active pane. 
  2131.  
  2132. $n_panes
  2133.   The number of panes in the current window. 
  2134.  
  2135. $overtype_mode
  2136.   True if in Overtype mode. 
  2137.  
  2138. $read_only
  2139.   True if the file is read only. 
  2140.  
  2141. $selection_start, $selection_end   
  2142.   Beginning and ending positions of the primary selection in the current 
  2143.   window, or -1 if there is no text selected in the current window. 
  2144.  
  2145. $selection_left, $selection_right  
  2146.   Left and right character offsets of the rectangular (primary) selection in 
  2147.   the current window, or -1 if there is no selection or it is not rectangular. 
  2148.  
  2149. $server_name
  2150.   Name of the current NEdit server. 
  2151.  
  2152. $show_line_numbers
  2153.   Whether line numbers are shown next to the text. 
  2154.  
  2155. $show_matching
  2156.   Contains the current preference for showing matching pairs, such as "[]" and 
  2157.   "{}" pairs. Can be "off", "delimiter", or "range". 
  2158.  
  2159. $match_syntax_based
  2160.   Whether pair matching should use syntax information, if available. 
  2161.  
  2162. $statistics_line
  2163.   Has a value of 1 if the statistics line is shown, otherwise 0. 
  2164.  
  2165. $sub_sep
  2166.   Contains the value of the array sub-script separation string. 
  2167.  
  2168. $tab_dist
  2169.   The distance between tab stops for a hardware tab character, as set in the 
  2170.   Tabs... dialog of the Preferences menu. 
  2171.  
  2172. $text_length
  2173.   The length of the text in the current window. 
  2174.  
  2175. $top_line
  2176.   The line number of the top line of the currently active pane. 
  2177.  
  2178. $use_tabs
  2179.   Whether the user is allowing the NEdit to insert tab characters to maintain 
  2180.   spacing in tab emulation and rectangular dragging operations. (The setting 
  2181.   of the "Use tab characters in padding and emulated tabs" button in the 
  2182.   Tabs... dialog of the Preferences menu.) 
  2183.  
  2184. $wrap_margin
  2185.   The right margin in the current window for text wrapping and filling. 
  2186.  
  2187. $wrap_text
  2188.   The current wrap text mode. Values are "none", "auto" or "continuous". 
  2189.  
  2190.  
  2191.   BUILT-IN SUBROUTINES
  2192.  
  2193. append_file( string, filename )
  2194.   Appends a string to a named file. Returns 1 on successful write, or 0 if 
  2195.   unsuccessful. 
  2196.  
  2197. beep()
  2198.   Ring the bell. 
  2199.  
  2200. clipboard_to_string()  
  2201.   Returns the contents of the clipboard as a macro string. Returns empty 
  2202.   string on error. 
  2203.  
  2204. dialog( message, btn_1_label, btn_2_label, ... )  
  2205.   Pop up a dialog for querying and presenting information to the user. First 
  2206.   argument is a string to show in the message area of the dialog. Up to eight 
  2207.   additional optional arguments represent labels for buttons to appear along 
  2208.   the bottom of the dialog. Returns the number of the button pressed (the 
  2209.   first button is number 1), or 0 if the user closed the dialog via the window 
  2210.   close box. 
  2211.  
  2212. focus_window( window_name )  
  2213.   Sets the window on which subsequent macro commands operate. window_name can 
  2214.   be either a fully qualified file name, or one of "last" for the last window 
  2215.   created, or "next" for the next window in the chain from the currently 
  2216.   focused window (the first window being the one returned from calling 
  2217.   focus_window("last"). Returns the name of the newly-focused window, or an 
  2218.   empty string if the requested window was not found. 
  2219.  
  2220. get_character( position )  
  2221.   Returns the single character at the position indicated by the first argument 
  2222.   to the routine from the current window. 
  2223.  
  2224. get_range( start, end )  
  2225.   Returns the text between a starting and ending position from the current 
  2226.   window. 
  2227.  
  2228. get_selection()  
  2229.   Returns a string containing the text currently selected by the primary 
  2230.   selection either from the current window (no keyword), or from anywhere on 
  2231.   the screen (keyword "any"). 
  2232.  
  2233. getenv( name )
  2234.   Gets the value of an environment variable. 
  2235.  
  2236. length( string )
  2237.   Returns the length of a string 
  2238.  
  2239. list_dialog( message, text, btn_1_label, btn_2_label, ... )  
  2240.   Pop up a dialog for prompting the user to choose a line from the given text 
  2241.   string. The first argument is a message string to be used as a title for the 
  2242.   fixed text describing the list. The second string provides the list data: 
  2243.   this is a text string in which list entries are separated by newline 
  2244.   characters. Up to seven additional optional arguments represent labels for 
  2245.   buttons to appear along the bottom of the dialog. Returns the line of text 
  2246.   selected by the user as the function value (without any newline separator) 
  2247.   or the empty string if none was selected, and number of the button pressed 
  2248.   (the first button is number 1), in $list_dialog_button. If the user closes 
  2249.   the dialog via the window close box, the function returns the empty string, 
  2250.   and $list_dialog_button returns 0. 
  2251.  
  2252. max( n1, n2, ... )
  2253.   Returns the maximum value of all of its arguments 
  2254.  
  2255. min( n1, n2, ... )
  2256.   Returns the minimum value of all of its arguments 
  2257.  
  2258. read_file( filename )  
  2259.   Reads the contents of a text file into a string. On success, returns 1 in 
  2260.   $read_status, and the contents of the file as a string in the subroutine 
  2261.   return value. On failure, returns the empty string "" and an 0 $read_status. 
  2262.  
  2263. replace_in_string( string, search_for, replace_with [, type] )  
  2264.   Replaces all occurrences of a search string in a string with a replacement 
  2265.   string. Arguments are 1: string to search in, 2: string to search for, 3: 
  2266.   replacement string. Argument 4 is an optional search type, one of "literal", 
  2267.   "case", "word", "caseWord", "regex", or "regexNoCase". The default search 
  2268.   type is "literal". Returns a new string with all of the replacements done, 
  2269.   or an empty string ("") if no occurrences were found. 
  2270.  
  2271. replace_range( start, end, string )  
  2272.   Replaces all of the text in the current window between two positions. 
  2273.  
  2274. replace_selection( string )  
  2275.   Replaces the primary-selection selected text in the current window. 
  2276.  
  2277. replace_substring( string, start, end, replace_with )  
  2278.   Replacing a substring between two positions in a string within another 
  2279.   string. 
  2280.  
  2281. search( search_for, start [, search_type, wrap, direction] )  
  2282.   Searches silently in a window without dialogs, beeps, or changes to the 
  2283.   selection. Arguments are: 1: string to search for, 2: starting position. 
  2284.   Optional arguments may include the strings: "wrap" to make the search wrap 
  2285.   around the beginning or end of the string, "backward" or "forward" to change 
  2286.   the search direction ("forward" is the default), "literal", "case", "word", 
  2287.   "caseWord", "regex", or "regexNoCase" to change the search type (default is 
  2288.   "literal"). Returns the starting position of the match, or -1 if nothing 
  2289.   matched. Also returns the ending position of the match in $search_end. 
  2290.  
  2291. search_string( string, search_for, start [, search_type, direction] ) 
  2292.  
  2293.   Built-in macro subroutine for searching a string. Arguments are 1: string to 
  2294.   search in, 2: string to search for, 3: starting position. Optional arguments 
  2295.   may include the strings: "wrap" to make the search wrap around the beginning 
  2296.   or end of the string, "backward" or "forward" to change the search direction 
  2297.   ("forward" is the default), "literal", "case", "word", "caseWord", "regex", 
  2298.   or "regexNoCase" to change the search type (default is "literal"). Returns 
  2299.   the starting position of the match, or -1 if nothing matched. Also returns 
  2300.   the ending position of the match in $search_end. 
  2301.  
  2302. select( start, end )  
  2303.   Selects (with the primary selection) text in the current buffer between a 
  2304.   starting and ending position. 
  2305.  
  2306. select_rectangle( start, end, left, right )  
  2307.   Selects a rectangular area of text between a starting and ending position, 
  2308.   and confined horizontally to characters displayed between positions "left", 
  2309.   and "right". 
  2310.  
  2311. set_cursor_pos( position )
  2312.   Set the cursor position for the current window. 
  2313.  
  2314. shell_command( command, input_string )  
  2315.   Executes a shell command, feeding it input from input_string. On completion, 
  2316.   output from the command is returned as the function value, and the command's 
  2317.   exit status is returned in the global variable $shell_cmd_status. 
  2318.  
  2319. split(string, separation_string [, search_type])
  2320.   Splits a string using the separator specified. Optionally the search_type 
  2321.   argument can specify how the separation_string is interpreted. The default 
  2322.   is "literal". The returned value is an array with keys beginning at 0. 
  2323.  
  2324. string_dialog( message, btn_1_label, btn_2_label, ... )  
  2325.   Pops up a dialog prompting the user to enter information. The first argument 
  2326.   is a string to show in the message area of the dialog. Up to nine additional 
  2327.   optional arguments represent labels for buttons to appear along the bottom 
  2328.   of the dialog. Returns the string entered by the user as the function value, 
  2329.   and number of the button pressed (the first button is number 1), in 
  2330.   $string_dialog_button. If the user closes the dialog via the window close 
  2331.   box, the function returns the empty string, and $string_dialog_button 
  2332.   returns 0. 
  2333.  
  2334. string_compare(string1, string2 [, consider-case])
  2335.   Compare two strings and return 0 if they are equal, -1 if string1 is less 
  2336.   than string2 or 1 if string1 is greater than string2. The values for the 
  2337.   optional consider-case argument is either "case" or "nocase". The default is 
  2338.   to do a case sensitive comparison. 
  2339.  
  2340. string_to_clipboard( string )  
  2341.   Copy the contents of a macro string to the clipboard. 
  2342.  
  2343. substring( string, start, end )  
  2344.   Returns the portion of a string between a starting and ending position. 
  2345.  
  2346. t_print( string1, string2, ... )  
  2347.   Writes strings to the terminal (stdout) from which NEdit was started. 
  2348.  
  2349. tolower( string )
  2350.   Return an all lower-case version of string. 
  2351.  
  2352. toupper( string )
  2353.   Return an all upper-case version of string. 
  2354.  
  2355. write_file( string, filename )  
  2356.   Writes a string (parameter 1) to a file named in parameter 2. Returns 1 on 
  2357.   successful write, or 0 if unsuccessful. 
  2358.  
  2359. ---------------
  2360. ACTION ROUTINES
  2361. ---------------
  2362.  
  2363.   All of the editing capabilities of NEdit are represented as a special type 
  2364.   of subroutine, called an action routine, which can be invoked from both 
  2365.   macros and translation table entries (see "Key Binding" in the Customizing 
  2366.   section of the Help menu). 
  2367.  
  2368.  
  2369.   ACTIONS REPRESENTING MENU COMMANDS
  2370.  
  2371.     File Menu                 Search Menu
  2372.     -----------------------   -------------------------
  2373.     new()                     find()
  2374.     open()                    find_dialog()
  2375.     open_dialog()             find_again()
  2376.     open_selected()           find_selection()
  2377.     close()                   replace()
  2378.     save()                    replace_dialog()
  2379.     save_as()                 replace_all()
  2380.     save_as_dialog()          replace_in_selection()
  2381.     revert_to_saved()         replace_again()
  2382.     include_file()            goto_line_number()
  2383.     include_file_dialog()     goto_line_number_dialog()
  2384.     load_macro_file()         goto_selected()
  2385.     load_macro_file_dialog()  mark()
  2386.     load_tags_file()          mark_dialog()
  2387.     load_tags_file_dialog()   goto_mark()
  2388.     unload_tags_file()        goto_mark_dialog()
  2389.     print()                   goto_matching()
  2390.     print_selection()         select_to_matching()
  2391.     exit()                    find_definition()
  2392.  
  2393.     Edit Menu                 Shell Menu
  2394.     -----------------------   -------------------------
  2395.     undo()                    filter_selection_dialog()
  2396.     redo()                    filter_selection()
  2397.     delete()                  execute_command()
  2398.     select_all()              execute_command_dialog()
  2399.     shift_left()              execute_command_line()
  2400.     shift_left_by_tab()       shell_menu_command()
  2401.     shift_right()
  2402.     shift_right_by_tab()      Macro Menu
  2403.     uppercase()               -------------------------
  2404.     lowercase()               macro_menu_command()
  2405.     fill_paragraph()          repeat_macro()
  2406.     control_code_dialog()     repeat_dialog()
  2407.  
  2408.                               Windows Menu
  2409.                               -------------------------
  2410.                               split_window()
  2411.                               close_pane()
  2412.  
  2413.   An action representing a menu command is named the same as its corresponding 
  2414.   menu item except that all punctuation is removed, all letters are changed to 
  2415.   lower case, and spaces are replaced with underscores. To present a dialog to 
  2416.   ask the user for input, use the actions with the `_dialog` suffix. Actions 
  2417.   without the `_dialog` suffix take the information from the routine's 
  2418.   arguments (see below). 
  2419.  
  2420.  
  2421.   MENU ACTION ROUTINE ARGUMENTS
  2422.  
  2423.   Arguments are text strings enclosed in quotes. Below are the menu action 
  2424.   routines which take arguments. Optional arguments are enclosed in []. 
  2425.  
  2426.     close( ["prompt" | "save" | "nosave"] )
  2427.  
  2428.     execute_command( shell-command )
  2429.  
  2430.     filter_selection( shell-command )
  2431.  
  2432.     find( search-string [, search-direction] [, search-type] 
  2433.        [, search-wrap] )
  2434.  
  2435.     find_again( [search-direction] [, search-wrap] )
  2436.  
  2437.     find_definition( [tag-name] )
  2438.  
  2439.     find_dialog( [search-direction] [, search-type] 
  2440.        [, keep-dialog] )
  2441.  
  2442.     find_selection( [search-direction] [, search-wrap] 
  2443.        [, non-regex-search-type] )
  2444.  
  2445.     goto_line_number( [line-number] )
  2446.  
  2447.     goto_mark( mark-letter )
  2448.  
  2449.     include_file( filename )
  2450.  
  2451.     load_tags_file( filename )
  2452.  
  2453.     macro_menu_command( macro-menu-item-name )
  2454.  
  2455.     mark( mark-letter )
  2456.  
  2457.     open( filename )
  2458.  
  2459.     replace( search-string, replace-string, 
  2460.        [, search-direction] [, search-type] [, search-wrap] )
  2461.  
  2462.     replace_again( [search-direction] [, search-wrap] )
  2463.  
  2464.     replace_dialog( [search-direction] [, search-type]
  2465.        [, keep-dialog] )
  2466.  
  2467.     replace_in_selection( search-string, 
  2468.        replace-string [, search-type] )
  2469.  
  2470.     save_as( filename )
  2471.  
  2472.     shell_menu_command( shell-menu-item-name )
  2473.  
  2474.     unload_tags_file( filename )
  2475.  
  2476.     ----------- Some notes on argument types above -----------
  2477.  
  2478.     filename       Path names are relative to the directory from
  2479.                    which NEdit was started. Shell interpreted 
  2480.                    wildcards and `~' are not expanded.
  2481.  
  2482.     keep-dialog    Either "keep" or "nokeep".
  2483.  
  2484.     mark-letter    The mark command limits users to single 
  2485.                    letters. Inside of macros, numeric marks are
  2486.                    allowed, which won't interfere with marks set
  2487.                    by the user.
  2488.  
  2489.     macro-menu-item-name
  2490.                    Name of the command exactly as specified in 
  2491.                    the Macro Menu dialogs.
  2492.  
  2493.     non-regex-search-type 
  2494.                    Either "literal", "case", "word", or 
  2495.                    "caseWord".
  2496.  
  2497.     search-direction
  2498.                    Either "forward" or "backward".
  2499.  
  2500.     search-type    Either "literal", "case", "word", 
  2501.                    "caseWord", "regex", or "regexNoCase".
  2502.  
  2503.     search-wrap    Either "wrap" or "nowrap".
  2504.  
  2505.     shell-menu-item-name
  2506.                    Name of the command exactly as specified in 
  2507.                    the Shell Menu dialogs.
  2508.  
  2509.  
  2510.   WINDOW PREFERENCES ACTIONS
  2511.  
  2512. set_auto_indent( "off" | "on" | "smart" )
  2513.   Set auto indent mode for the current window. 
  2514.  
  2515. set_em_tab_dist( em-tab-distance )
  2516.   Set the emulated tab size. An em-tab-distance value of 0 or -1 translates to 
  2517.   no emulated tabs. Em-tab-distance must be smaller than 1000. 
  2518.  
  2519. set_fonts( font-name, italic-font-name, bold-font-name, bold-italic-font-name )
  2520.   Set all the fonts used for the current window. 
  2521.  
  2522. set_highlight_syntax( [0 | 1] )
  2523.   Set syntax highlighting mode for the current window. A value of 0 turns it 
  2524.   off and a value of 1 turns it on. If no parameters are supplied the option 
  2525.   is toggled. 
  2526.  
  2527. set_incremental_backup( [0 | 1] )
  2528.   Set incremental backup mode for the current window. A value of 0 turns it 
  2529.   off and a value of 1 turns it on. If no parameters are supplied the option 
  2530.   is toggled. 
  2531.  
  2532. set_incremental_search_line( [0 | 1] )
  2533.   Show or hide the incremental search line for the current window. A value of 
  2534.   0 turns it off and a value of 1 turns it on. If no parameters are supplied 
  2535.   the option is toggled. 
  2536.  
  2537. set_language_mode( language-mode )
  2538.   Set the language mode for the current window. If the language mode is "" or 
  2539.   unrecognized, it will be set to Plain. 
  2540.  
  2541. set_locked( [0 | 1] )
  2542.   This only affects the locked status of a file, not it's read-only status. 
  2543.   Permissions are NOT changed. A value of 0 turns it off and a value of 1 
  2544.   turns it on. If no parameters are supplied the option is toggled. 
  2545.  
  2546. set_make_backup_copy( [0 | 1] )
  2547.   Set whether backup copies are made during saves for the current window. A 
  2548.   value of 0 turns it off and a value of 1 turns it on. If no parameters are 
  2549.   supplied the option is toggled. 
  2550.  
  2551. set_overtype_mode( [0 | 1] )
  2552.   Set overtype mode for the current window. A value of 0 turns it off and a 
  2553.   value of 1 turns it on. If no parameters are supplied the option is toggled. 
  2554.  
  2555. set_show_line_numbers( [0 | 1] )
  2556.   Show or hide line numbers for the current window. A value of 0 turns it off 
  2557.   and a value of 1 turns it on. If no parameters are supplied the option is 
  2558.   toggled. 
  2559.  
  2560. set_show_matching( "off" | "delimiter" | "range" )
  2561.   Set show matching (...) mode for the current window. 
  2562.  
  2563. set_match_syntax_based( [0 | 1] )
  2564.   Set whether matching should be syntax based for the current window. 
  2565.  
  2566. set_statistics_line( [0 | 1] )
  2567.   Show or hide the statistics line for the current window. A value of 0 turns 
  2568.   it off and a value of 1 turns it on. If no parameters are supplied the 
  2569.   option is toggled. 
  2570.  
  2571. set_tab_dist( tab-distance )
  2572.   Set the size of hardware tab spacing. Tab-distance must must be a value 
  2573.   greater than 0 and no greater than 20. 
  2574.  
  2575. set_use_tabs( [0 | 1] )
  2576.   Set whether tabs are used for the current window. A value of 0 turns it off 
  2577.   and a value of 1 turns it on. If no parameters are supplied the option is 
  2578.   toggled. 
  2579.  
  2580. set_wrap_margin( wrap-width )
  2581.   Set the wrap width for text wrapping of the current window. A value of 0 
  2582.   means to wrap at window width. 
  2583.  
  2584. set_wrap_text( "none" | "auto" | "continuous" )
  2585.   Set wrap text mode for the current window. 
  2586.  
  2587.  
  2588.   KEYBOARD-ONLY ACTIONS
  2589.  
  2590.   In addition to the arguments listed in the call descriptions below, any 
  2591.   routine involving cursor movement can take the argument "extend", meaning, 
  2592.   adjust the primary selection to the new cursor position. Routines which take 
  2593.   the "extend" argument as well as mouse dragging operations for both primary 
  2594.   and secondary selections can take the optional keyword "rect", meaning, make 
  2595.   the selection rectangular. Any routine that accepts the "scrollbar" argument 
  2596.   will move the display but not the cursor or selection. Routines that accept 
  2597.   the "nobell" argument will fail silently without beeping, when that argument 
  2598.   is supplied. 
  2599.  
  2600. backward_character( ["nobell"] )
  2601.   Moves the cursor one character to the left. 
  2602.  
  2603. backward_paragraph(["nobell"] )
  2604.   Moves the cursor to the beginning of the paragraph, or if the cursor is 
  2605.   already at the beginning of a paragraph, moves the cursor to the beginning 
  2606.   of the previous paragraph. Paragraphs are defined as regions of text 
  2607.   delimited by one or more blank lines. 
  2608.  
  2609. backward_word( ["nobell"] )
  2610.   Moves the cursor to the beginning of a word, or, if the cursor is already at 
  2611.   the beginning of a word, moves the cursor to the beginning of the previous 
  2612.   word. Word delimiters are user-settable, and defined by the X resource 
  2613.   wordDelimiters. 
  2614.  
  2615. beginning_of_file( ["scrollbar"] )
  2616.   Moves the cursor to the beginning of the file. 
  2617.  
  2618. beginning_of_line()
  2619.   Moves the cursor to the beginning of the line. 
  2620.  
  2621. beginning_of_selection()
  2622.   Moves the cursor to the beginning of the selection without disturbing the 
  2623.   selection. 
  2624.  
  2625. copy_clipboard()
  2626.   Copies the current selection to the clipboard. 
  2627.  
  2628. copy_primary()
  2629.   Copies the primary selection to the cursor. 
  2630.  
  2631. copy_to()
  2632.   If a secondary selection exists, copies the secondary selection to the 
  2633.   cursor. If no secondary selection exists, copies the primary selection to 
  2634.   the pointer location. 
  2635.  
  2636. copy_to_or_end_drag()
  2637.   Completes either a secondary selection operation, or a primary drag. If the 
  2638.   user is dragging the mouse to adjust a secondary selection, the selection is 
  2639.   copied and either inserted at the cursor location, or, if pending-delete is 
  2640.   on and a primary selection exists in the window, replaces the primary 
  2641.   selection. If the user is dragging a block of text (primary selection), 
  2642.   completes the drag operation and leaves the text at it's current location. 
  2643.  
  2644. cut_clipboard()
  2645.   Deletes the text in the primary selection and places it in the clipboard. 
  2646.  
  2647. cut_primary()
  2648.   Copies the primary selection to the cursor and deletes it at its original 
  2649.   location. 
  2650.  
  2651. delete_selection()
  2652.   Deletes the contents of the primary selection. 
  2653.  
  2654. delete_next_character( ["nobell"] )
  2655.   If a primary selection exists, deletes its contents. Otherwise, deletes the 
  2656.   character following the cursor. 
  2657.  
  2658. delete_previous_character( ["nobell"] )
  2659.   If a primary selection exists, deletes its contents. Otherwise, deletes the 
  2660.   character before the cursor. 
  2661.  
  2662. delete_next_word( ["nobell"] )
  2663.   If a primary selection exists, deletes its contents. Otherwise, deletes the 
  2664.   word following the cursor. 
  2665.  
  2666. delete_previous_word( ["nobell"] )
  2667.   If a primary selection exists, deletes its contents. Otherwise, deletes the 
  2668.   word before the cursor. 
  2669.  
  2670. delete_to_start_of_line( ["nobell"] )
  2671.   If a primary selection exists, deletes its contents. Otherwise, deletes the 
  2672.   characters between the cursor and the start of the line. 
  2673.  
  2674. delete_to_end_of_line( ["nobell"] )
  2675.   If a primary selection exists, deletes its contents. Otherwise, deletes the 
  2676.   characters between the cursor and the end of the line. 
  2677.  
  2678. deselect_all()
  2679.   De-selects the primary selection. 
  2680.  
  2681. end_of_file( ["scrollbar"] )
  2682.   Moves the cursor to the end of the file. 
  2683.  
  2684. end_of_line()
  2685.   Moves the cursor to the end of the line. 
  2686.  
  2687. end_of_selection()
  2688.   Moves the cursor to the end of the selection without disturbing the 
  2689.   selection. 
  2690.  
  2691. exchange( ["nobell"] )
  2692.   Exchange the primary and secondary selections. 
  2693.  
  2694. extend_adjust()
  2695.   Attached mouse-movement events to begin a selection between the cursor and 
  2696.   the mouse, or extend the primary selection to the mouse position. 
  2697.  
  2698. extend_end()
  2699.   Completes a primary drag-selection operation. 
  2700.  
  2701. extend_start()
  2702.   Begins a selection between the cursor and the mouse. A drag-selection 
  2703.   operation can be started with either extend_start or grab_focus. 
  2704.  
  2705. focus_pane( [relative-pane] | [positive-index] | [negative-index] )
  2706.   Move the focus to the requested pane. Arguments can be specified in the form 
  2707.   of a relative-pane ("first", "last", "next", "previous"), a positive-index 
  2708.   (numbers greater than 0, 1 is the same as "first") or a negative-index 
  2709.   (numbers less than 0, -1 is the same as "last"). 
  2710.  
  2711. forward_character()
  2712.   Moves the cursor one character to the right. 
  2713.  
  2714. forward_paragraph( ["nobell"] )
  2715.   Moves the cursor to the beginning of the next paragraph. Paragraphs are 
  2716.   defined as regions of text delimited by one or more blank lines. 
  2717.  
  2718. forward_word( ["tail"] ["nobell"] )
  2719.   Moves the cursor to the beginning of the next word. Word delimiters are 
  2720.   user-settable, and defined by the X resource wordDelimiters. If the "tail" 
  2721.   argument is supplied the cursor will be moved to the end of the current word 
  2722.   or the end of the next word, if the cursor is between words. 
  2723.  
  2724. grab_focus()
  2725.   Moves the cursor to the mouse pointer location, and prepares for a possible 
  2726.   drag-selection operation (bound to extend_adjust), or multi-click operation 
  2727.   (a further grab_focus action). If a second invocation of grab focus follows 
  2728.   immediately, it selects a whole word, or a third, a whole line. 
  2729.  
  2730. insert_string( "string" )
  2731.   If pending delete is on and the cursor is inside the selection, replaces the 
  2732.   selection with "string". Otherwise, inserts "string" at the cursor location. 
  2733.  
  2734. key_select( "direction" [,"nobell"] )
  2735.   Moves the cursor one character in "direction" ("left", "right", "up", or 
  2736.   "down") and extends the selection. Same as 
  2737.   forward/backward-character("extend"), or process-up/down("extend"), for 
  2738.   compatibility with previous versions. 
  2739.  
  2740. move-destination()
  2741.   Moves the cursor to the pointer location without disturbing the selection. 
  2742.   (This is an unusual way of working. We left it in for compatibility with 
  2743.   previous versions, but if you actually use this capability, please send us 
  2744.   some mail, otherwise it is likely to disappear in the future. 
  2745.  
  2746. move_to()
  2747.   If a secondary selection exists, deletes the contents of the secondary 
  2748.   selection and inserts it at the cursor, or if pending-delete is on and there 
  2749.   is a primary selection, replaces the primary selection. If no secondary 
  2750.   selection exists, moves the primary selection to the pointer location, 
  2751.   deleting it from its original position. 
  2752.  
  2753. move_to_or_end_drag()
  2754.   Completes either a secondary selection operation, or a primary drag. If the 
  2755.   user is dragging the mouse to adjust a secondary selection, the selection is 
  2756.   deleted and either inserted at the cursor location, or, if pending-delete is 
  2757.   on and a primary selection exists in the window, replaces the primary 
  2758.   selection. If the user is dragging a block of text (primary selection), 
  2759.   completes the drag operation and deletes the text from it's current 
  2760.   location. 
  2761.  
  2762. newline()
  2763.   Inserts a newline character. If Auto Indent is on, lines up the indentation 
  2764.   of the cursor with the current line. 
  2765.  
  2766. newline_and_indent()
  2767.   Inserts a newline character and lines up the indentation of the cursor with 
  2768.   the current line, regardless of the setting of Auto Indent. 
  2769.  
  2770. newline_no_indent()
  2771.   Inserts a newline character, without automatic indentation, regardless of 
  2772.   the setting of Auto Indent. 
  2773.  
  2774. next_page( ["stutter"] ["column"] ["scrollbar"] ["nobell"] )
  2775.   Moves the cursor and scroll forward one page. The parameter "stutter" moves 
  2776.   the cursor to the bottom of the display, unless it is already there, 
  2777.   otherwise it will page down. The parameter "column" will maintain the 
  2778.   preferred column while moving the cursor. 
  2779.  
  2780. page_left( ["scrollbar"] ["nobell"] )
  2781.   Move the cursor and scroll left one page. 
  2782.  
  2783. page_right( ["scrollbar"] ["nobell"] )
  2784.   Move the cursor and scroll right one page. 
  2785.  
  2786. paste_clipboard()
  2787.   Insert the contents of the clipboard at the cursor, or if pending delete is 
  2788.   on, replace the primary selection with the contents of the clipboard. 
  2789.  
  2790. previous_page( ["stutter"] ["column"] ["scrollbar"] ["nobell"] )
  2791.   Moves the cursor and scroll backward one page. The parameter "stutter" moves 
  2792.   the cursor to the top of the display, unless it is already there, otherwise 
  2793.   it will page up. The parameter "column" will maintain the preferred column 
  2794.   while moving the cursor. 
  2795.  
  2796. process_bdrag()
  2797.   Same as secondary_or_drag_start for compatibility with previous versions. 
  2798.  
  2799. process_cancel()
  2800.   Cancels the current extend_adjust, secondary_adjust, or 
  2801.   secondary_or_drag_adjust in progress. 
  2802.  
  2803. process_down( ["nobell"] )
  2804.   Moves the cursor down one line. 
  2805.  
  2806. process_return()
  2807.   Same as newline for compatibility with previous versions. 
  2808.  
  2809. process_shift_down( ["nobell"] )
  2810.   Same as process_down("extend") for compatibility with previous versions. 
  2811.  
  2812. process_shift_up( ["nobell"] )
  2813.   Same as process_up("extend") for compatibility with previous versions. 
  2814.  
  2815. process_tab()
  2816.   If tab emulation is turned on, inserts an emulated tab, otherwise inserts a 
  2817.   tab character. 
  2818.  
  2819. process_up( ["nobell"] )
  2820.   Moves the cursor up one line. 
  2821.  
  2822. raise_window([relative-window] | [positive-index] | [negative-index])
  2823.   Raise the current focused window to the front if no argument is supplied. 
  2824.   Arguments can be specified in the form of a relative-window ("first", 
  2825.   "last", "next", "previous"), a positive-index (numbers greater than 0, 1 is 
  2826.   the same as "last") or a negative-index (numbers less than 0, -1 is the same 
  2827.   as "first"). 
  2828.  
  2829. scroll_down(nLines)
  2830.   Scroll the display down (towards the end of the file) by nLines. 
  2831.  
  2832. scroll_left( nPixels )
  2833.   Scroll the display left by nPixels. 
  2834.  
  2835. scroll_right( nPixels )
  2836.   Scroll the display right by nPixels. 
  2837.  
  2838. scroll_up( nLines )
  2839.   Scroll the display up (towards the beginning of the file) by nLines. 
  2840.  
  2841. scroll_to_line( lineNum )
  2842.   Scroll to position line number lineNum at the top of the pane. The first 
  2843.   line of a file is line 1. 
  2844.  
  2845. secondary_adjust()
  2846.   Attached mouse-movement events to extend the secondary selection to the 
  2847.   mouse position. 
  2848.  
  2849. secondary_or_drag_adjust()
  2850.   Attached mouse-movement events to extend the secondary selection, or 
  2851.   reposition the primary text being dragged. Takes two optional arguments, 
  2852.   "copy", and "overlay". "copy" leaves a copy of the dragged text at the site 
  2853.   at which the drag began. "overlay" does the drag in overlay mode, meaning 
  2854.   the dragged text is laid on top of the existing text, obscuring and 
  2855.   ultimately deleting it when the drag is complete. 
  2856.  
  2857. secondary_or_drag_start()
  2858.   To be attached to a mouse down event. Begins drag selecting a secondary 
  2859.   selection, or dragging the contents of the primary selection, depending on 
  2860.   whether the mouse is pressed inside of an existing primary selection. 
  2861.  
  2862. secondary_start()
  2863.   To be attached to a mouse down event. Begin drag selecting a secondary 
  2864.   selection. 
  2865.  
  2866. select_all()
  2867.   Select the entire file. 
  2868.  
  2869. self_insert()
  2870.   To be attached to a key-press event, inserts the character equivalent of the 
  2871.   key pressed. 
  2872.  
  2873.  
  2874. ===========
  2875. CUSTOMIZING
  2876. ===========
  2877.  
  2878. -----------------
  2879. CUSTOMIZING NEDIT
  2880. -----------------
  2881.  
  2882.   NEdit can be customized many different ways. The most important 
  2883.   user-settable options are presented in the Preferences menu, including all 
  2884.   options that users might need to change during an editing session. Options 
  2885.   set in the Default Settings sub-menu of the Preferences menu can be 
  2886.   preserved between sessions by selecting Save Defaults, which writes a file 
  2887.   called .nedit in the user's home directory. See the section titled 
  2888.   "Preferences" for more details. 
  2889.  
  2890.   User defined commands can be added to NEdit's Shell, Macro, and window 
  2891.   background menus. Dialogs for creating items in these menus can be found 
  2892.   under Customize Menus in the Default Settings sub menu of the Preferences 
  2893.   menu. 
  2894.  
  2895.   For users who depend on NEdit every day and want to tune every excruciating 
  2896.   detail, there are also X resources for tuning a vast number of such details, 
  2897.   down to the color of each individual button. See the section "X Resources" 
  2898.   for more information, as well as a list of selected resources. 
  2899.  
  2900.   The most common reason customizing your X resources for NEdit, however, is 
  2901.   key binding. While limited key binding can be done through Preferences 
  2902.   settings (Preferences -> Default Settings -> Customize Menus), you can 
  2903.   really only add keys this way, and each key must have a corresponding menu 
  2904.   item. Any significant changes to key binding should be made via the 
  2905.   Translations resource and menu accelerator resources. The sections titled 
  2906.   "Key Binding" and "X Resources" have more information. 
  2907.  
  2908. -----------
  2909. PREFERENCES
  2910. -----------
  2911.  
  2912.   The Preferences menu allows you to set options for both the current editing 
  2913.   window, and default values for newly created windows and future NEdit 
  2914.   sessions. Options in the Preferences menu itself (not in the Default 
  2915.   Settings sub-menu) take effect immediately and refer to the current window 
  2916.   only. Options in the Default Settings sub-menu have no effect on the current 
  2917.   window, but instead provide initial settings for future windows created 
  2918.   using the New or Open commands. Preferences set in the Default Settings 
  2919.   sub-menu can also be saved in a file that is automatically read by NEdit at 
  2920.   startup time, by selecting Save Defaults. 
  2921.  
  2922.  
  2923.   PREFERENCES MENU
  2924.  
  2925. Default Settings
  2926.   Menu of initial settings for future windows. Generally the same as the 
  2927.   options in the main part of the menu, but apply as defaults for future 
  2928.   windows created during this NEdit session. These settings can be saved using 
  2929.   the Save Defaults command below, to be loaded automatically each time NEdit 
  2930.   is started. 
  2931.  
  2932. Save Defaults
  2933.   Save the default options as set under Default Settings for future NEdit 
  2934.   sessions. 
  2935.  
  2936. Statistics Line
  2937.   Show the full file name, line number, and length of the file being edited. 
  2938.  
  2939. Incremental Search Line
  2940.   Keep the incremental search bar (Search -> Find Incremental) permanently 
  2941.   displayed at the top of the window. 
  2942.  
  2943. Show Line Numbers
  2944.   Display line numbers to the right of the text. 
  2945.  
  2946. Language Mode
  2947.   Tells NEdit what language (if any) to assume, for selecting 
  2948.   language-specific features such as highlight patterns and smart indent 
  2949.   macros, and setting language specific preferences like word delimiters, tab 
  2950.   emulation, and auto-indent. See Features for Programming -> Programming with 
  2951.   NEdit for more information. 
  2952.  
  2953. Auto Indent
  2954.   Setting Auto Indent "on" maintains a running indent (pressing the Return key 
  2955.   will line up the cursor with the indent level of the previous line). If 
  2956.   smart indent macros are available for the current language mode, smart 
  2957.   indent can be selected and NEdit will attempt to guess proper language 
  2958.   indentation for each new line. See Help -> Features for Programming -> 
  2959.   Automatic Indent for more information. 
  2960.  
  2961. Wrap
  2962.   Choose between two styles of automatic wrapping or none. Auto Newline wrap, 
  2963.   wraps text at word boundaries when the cursor reaches the right margin, by 
  2964.   replacing the space or tab at the last word boundary with a newline 
  2965.   character. Continuous Wrap wraps long lines which extend past the right 
  2966.   margin. Continuous Wrap mode is typically used to produce files where 
  2967.   newlines are omitted within paragraphs, to make text filling automatic (a 
  2968.   kind of poor-man's word processor). Text of this style is common on Macs and 
  2969.   PCs but is not necessarily supported very well under Unix (except in 
  2970.   programs which deal with e-mail, for which it is often the format of 
  2971.   choice). 
  2972.  
  2973. Wrap Margin
  2974.   Set margin for Auto Newline Wrap, Continuous Wrap, and Fill Paragraph. Lines 
  2975.   may, be wrapped at the right margin of the window, or the margin can be set 
  2976.   at a specific column. 
  2977.  
  2978. Tabs
  2979.   Set the tab distance (number of characters between tab stops) for tab 
  2980.   characters, and control tab emulation and use of tab characters in padding 
  2981.   and emulated tabs. 
  2982.  
  2983. Text Font...
  2984.   Change the font(s) used to display text (fonts for menus and dialogs must be 
  2985.   set using X resources for the text area of the window). See below for more 
  2986.   information. 
  2987.  
  2988. Highlight Syntax
  2989.   If NEdit recognizes the language being edited, and highlighting patterns are 
  2990.   available for that language, use fonts and colors to enhance viewing of the 
  2991.   file. (See Help -> Features for Programming -> Syntax Highlighting for more 
  2992.   information. 
  2993.  
  2994. Make Backup Copy
  2995.   On Save, write a backup copy of the file as it existed before the Save 
  2996.   command with the extension .bck (Unix only). 
  2997.  
  2998. Incremental Backup
  2999.   Periodically make a backup copy of the file being edited under the name 
  3000.   `~filename` on Unix or `_filename` on VMS (see Crash Recovery). 
  3001.  
  3002. Show Matching (..)
  3003.   Momentarily highlight matching parenthesis, brackets, and braces, or the 
  3004.   range between them, when one of these characters is typed, or when the 
  3005.   insertion cursor is positioned after it. Delimiter only highlights the 
  3006.   matching delimiter, while Range highlights the whole range of text between 
  3007.   the matching delimiters. 
  3008.  
  3009.   Optionally, the matching can make use of syntax information if syntax 
  3010.   highlighting is enabled. Alternatively, the matching is purely character 
  3011.   based. In general, syntax based matching results in fewer false matches. 
  3012.  
  3013. Overtype
  3014.   In overtype mode, new characters entered replace the characters in front of 
  3015.   the insertion cursor, rather than being inserted before them. 
  3016.  
  3017. Read Only
  3018.   Lock the file against accidental modification. This temporarily prevents the 
  3019.   file from being modified in this NEdit session. Note that this is different 
  3020.   from setting the file protection. 
  3021.  
  3022.  
  3023.   PREFERENCES -> DEFAULT SETTINGS MENU
  3024.  
  3025.   Options in the Preferences -> Default Settings menu have the same meaning as 
  3026.   those in the top-level Preferences menu, except that they apply to future 
  3027.   NEdit windows and future NEdit sessions if saved with the Save Defaults 
  3028.   command. Additional options which appear in this menu are: 
  3029.  
  3030. Language Modes
  3031.   Define language recognition information (for determining language mode from 
  3032.   file name or content) and set language specific preferences. 
  3033.  
  3034. Tag Collisions
  3035.   How to react to multiple tags for the same name. Tags are described in the 
  3036.   section: Features for Programmers -> Finding Declarations (ctags). In Show 
  3037.   All mode, all matching tags are displayed in a dialog. In Smart mode, if one 
  3038.   of the matching tags is in the current window, that tag is chosen, without 
  3039.   displaying the dialog. 
  3040.  
  3041. Customize Menus
  3042.   Add/remove items from the Shell, Macro, and window background menus (see 
  3043.   below). 
  3044.  
  3045. Customize Window Title
  3046.   Opens a dialog where the information to be displayed in the windows's title 
  3047.   field can be defined and tested. The dialog contains a Help button, 
  3048.   providing further information about the options available. 
  3049.  
  3050. Searching
  3051.   Options for controlling the behavior of Find and Replace commands: 
  3052.  
  3053.   Verbose - Presents search results in dialog form, asks before wrapping a 
  3054.   search back around the beginning (or end) of the file (unless Beep On Search 
  3055.   Wrap is turned on). 
  3056.  
  3057.   Wrap Around - Search and Replace operations wrap around the beginning (or 
  3058.   end) of the file. 
  3059.  
  3060.   Beep On Search Wrap - Beep when Search and Replace operations wrap around 
  3061.   the beginning (or end) of the file (only if Wrap Around is turned on). 
  3062.  
  3063.   Keep Dialogs Up - Don't pop down Replace and Find boxes after searching. 
  3064.  
  3065.   Default Search Style - Initial setting for search type in Find and Replace 
  3066.   dialogs. 
  3067.  
  3068.   Default Replace Scope - [THIS OPTION IS ONLY PRESENT WHEN NEDIT WAS COMPILED 
  3069.   WITH THE 
  3070.    -DREPLACE_SCOPE FLAG TO SELECT AN ALTERNATIVE REPLACE DIALOG LAYOUT.]
  3071.  
  3072.   Initial setting for the scope in the Replace/Find dialog, when a selection 
  3073.   exists. It can be either "In Window", "In Selection", or "Smart". "Smart" 
  3074.   results in "In Window" if the size of the selection is smaller than 1 line, 
  3075.   and to "In Selection" otherwise. 
  3076.  
  3077. Syntax Highlighting
  3078.   Program and configure enhanced text display for new or supported languages 
  3079.   (See Features for Programming -> Syntax Highlighting). 
  3080.  
  3081. Append Line Feed on Save
  3082.   Some UNIX tools expect that files end with a line feed. If this option is 
  3083.   activated, NEdit will append one if required. 
  3084.  
  3085. Sort Open Prev. Menu
  3086.   Option to order the File -> Open Previous menu alphabetically, versus in 
  3087.   order of last access. 
  3088.  
  3089. Popups Under Pointer
  3090.   Display pop-up dialogs centered on the current mouse position, as opposed to 
  3091.   centered on the parent window. This generally speeds interaction, and is 
  3092.   essential for users who users who set their window managers so keyboard 
  3093.   focus follows the mouse. 
  3094.  
  3095. Modification Warnings
  3096.   Pop up a warning dialog when files get changed external to NEdit. 
  3097.  
  3098. Exit Warnings
  3099.   Ask before exiting when two or more files are open in an NEdit session. 
  3100.  
  3101. Initial Window Size
  3102.   Default size for new windows. 
  3103.  
  3104.  
  3105.   CHANGING FONT(S)
  3106.  
  3107.   The font used to display text in NEdit is set under Preferences -> Text Font 
  3108.   (for the current window), or Preferences -> Default Settings Text Font (for 
  3109.   future windows). These dialogs also allow you to set fonts for syntax 
  3110.   highlighting. If you don't intend to use syntax highlighting, you can ignore 
  3111.   most of the dialog, and just set the field labeled Primary Font. 
  3112.  
  3113.   Unless you are absolutely certain about the types of files that you will be 
  3114.   editing with NEdit, you should choose a fixed-spacing font. Many, if not 
  3115.   most, plain-text files are written expecting to be viewed with fixed 
  3116.   character spacing, and will look wrong with proportional spacing. NEdit's 
  3117.   filling, wrapping, and rectangular operations will also work strangely if 
  3118.   you choose a proportional font. 
  3119.  
  3120.   Note that in the font browser (the dialog brought up by the Browse... 
  3121.   button), the subset of fonts which are shown is narrowed depending on the 
  3122.   characteristics already selected. It is therefore important to know that you 
  3123.   can unselect characteristics from the lists by clicking on the selected 
  3124.   items a second time. 
  3125.  
  3126.   Fonts for syntax highlighting should ideally match the primary font in both 
  3127.   height and spacing. A mismatch in spacing will result in similar distortions 
  3128.   as choosing a proportional font: column alignment will sometimes look wrong, 
  3129.   and rectangular operations, wrapping, and filling will behave strangely. A 
  3130.   mismatch in height will cause windows to re-size themselves slightly when 
  3131.   syntax highlighting is turned on or off, and increase the inter- line 
  3132.   spacing of the text. Unfortunately, on some systems it is hard to find sets 
  3133.   of fonts which match exactly in height. 
  3134.  
  3135.  
  3136.   CUSTOMIZING MENUS
  3137.  
  3138.   You can add or change items in the Shell, Macro, and window background menus 
  3139.   under Preferences -> Default Settings -> Customize Menus. When you choose 
  3140.   one of these, you will see a dialog with a list of the current 
  3141.   user-configurable items from the menu on the left. To change an existing 
  3142.   item, select it from the list, and its properties will appear in the 
  3143.   remaining fields of the dialog, where you may change them. Selecting the 
  3144.   item "New" from the list allows you to enter new items in the menu. 
  3145.  
  3146.   Hopefully most of the characteristics are self explanatory, but here are a 
  3147.   few things to note: 
  3148.  
  3149.   Accelerator keys are keyboard shortcuts which appear on the right hand side 
  3150.   of the menus, and allow you avoid pulling down the menu and activate the 
  3151.   command with a single keystroke. Enter accelerators by typing the keys 
  3152.   exactly as you would to activate the command. 
  3153.  
  3154.   Mnemonics are a single letter which should be part of the menu item name, 
  3155.   which allow users to traverse and activate menu items by typing keys when 
  3156.   the menu is pulled down. 
  3157.  
  3158.   In the Shell Command field of the Shell Commands dialog, the % character 
  3159.   expands to the name (including directory path) of the file in the window. To 
  3160.   include a % character in the command, use %%. 
  3161.  
  3162.   The Menu Entry field can contain special characters for constructing 
  3163.   hierarchical sub-menus, and for making items which appear only in certain 
  3164.   language modes. The right angle bracket character ">" creates a sub-menu. 
  3165.   The name of the item itself should be the last element of the path formed 
  3166.   from successive sub-menu names joined with ">". Menu panes are called in to 
  3167.   existence simply by naming them as part of a Menu Entry name. To put several 
  3168.   items in the same sub-menu, repeat the same hierarchical sequence for each. 
  3169.   For example, in the Macro Commands dialog, two items with menu entries: 
  3170.   a>b>c and a>b>d would create a single sub menu under the macro menu called 
  3171.   "a", which would contain a single sub-menu, b, holding the actual items, c 
  3172.   and d: 
  3173.  
  3174.       +---++---++---+
  3175.       |a >||b >||c  |
  3176.       +---++---+|d  |
  3177.                 +---+
  3178.  
  3179.   To qualify a menu entry with a language mode, simply add an at-sign "@" at 
  3180.   the end of the menu command, followed (no space) by a language mode name. To 
  3181.   make a menu item which appears in several language modes, append additional 
  3182.   @s and language mode names. For example, an item with the menu entry: 
  3183.  
  3184.     Make C Prototypes@C@C++
  3185.  
  3186.   would appear only in C and C++ language modes, and: 
  3187.  
  3188.     Make Class Template@C++
  3189.  
  3190.   would appear only in C++ mode. 
  3191.  
  3192.   Menu items with no qualification appear in all language modes. 
  3193.  
  3194.   If a menu item is followed by the single language qualification "@*", that 
  3195.   item will appear only if there are no applicable language-specific items of 
  3196.   the same name in the same submenu. For example, if you have the following 
  3197.   three entries in the same menu: 
  3198.  
  3199.     Make Prototypes@C@C++
  3200.     Make Prototypes@Java
  3201.     Make Prototypes@*
  3202.  
  3203.   The first will be available when the language mode is C or C++, the second 
  3204.   when the language mode is Java, and for all other language modes (including 
  3205.   the "Plain" non-language mode). If the entry: 
  3206.  
  3207.     Make Prototypes
  3208.  
  3209.   also exists, this will always appear, meaning that the menu will always have 
  3210.   two "Make Prototypes" entries, whatever the language mode. 
  3211.  
  3212.  
  3213.   SHARING CUSTOMIZATIONS WITH OTHER NEDIT USERS
  3214.  
  3215.   If you have written macro or shell menu commands, highlight patterns, or 
  3216.   smart-indent macros that you want to share with other NEdit users, you can 
  3217.   make a file which they can load into their NEdit environment. 
  3218.  
  3219.   To load such a file, start NEdit with the command: 
  3220.  
  3221.      nedit -import <file>
  3222.  
  3223.   In the new NEdit session, verify that the imported patterns or macros do 
  3224.   what you want, then select Preferences -> Save Defaults. Saving incorporates 
  3225.   the changes into your own .nedit file, so the next time you run NEdit, you 
  3226.   will not have to import the distribution file. 
  3227.  
  3228.   Loading a customization file is automated, but creating one is not. To 
  3229.   produce a file to be imported by other users, you must make a copy of your 
  3230.   own .nedit file, and edit it, by hand, to remove everything but the few 
  3231.   items of interest to the recipient. Leave only the individual resource(s), 
  3232.   and within those resources, only the particular macro, pattern, style, etc, 
  3233.   that you wish to exchange. For example, to share a highlighting pattern set, 
  3234.   you would include the patterns, any new styles you added, and language mode 
  3235.   information only if the patterns are intended to support a new language 
  3236.   rather than updating an existing one. For example: 
  3237.  
  3238.      nedit.highlightPatterns:\
  3239.           My Language:1:0{\n\
  3240.                   Comment:"#":"$"::Comment::\n\
  3241.                   Loop Header:"^[ \\t]*loop:":::Loop::\n\
  3242.           }
  3243.      nedit.languageModes: My Language:.my::::::
  3244.      nedit.styles: Loop:blue:Bold
  3245.  
  3246.   Resources are in the format of X resource files, but the format of text 
  3247.   within multiple-item resources like highlight patterns, language modes, 
  3248.   macros, styles, etc., are private to NEdit. Each resource is a string which 
  3249.   ends at the first newline character not escaped with \, so you must be 
  3250.   careful about how you treat ends of lines. While you can generally just cut 
  3251.   and paste indented sections, if something which was originally in the middle 
  3252.   of a resource string is now at the end, you must remove the \ line 
  3253.   continuation character(s) so it will not join the next line into the 
  3254.   resource. Conversely, if something which was originally at the end of a 
  3255.   resource is now in the middle, you'll have to add continuation character(s) 
  3256.   to make sure that the resource string is properly continued from beginning 
  3257.   to end, and possibly newline character(s) (\n) to make sure that it is 
  3258.   properly separated from the next item. 
  3259.  
  3260. -----------
  3261. X RESOURCES
  3262. -----------
  3263.  
  3264.   NEdit has additional options to those provided in the Preferences menu which 
  3265.   are set using X resources. Like most other X programs, NEdit can be 
  3266.   customized to vastly unnecessary proportions, from initial window positions 
  3267.   down to the font and shadow colors of each individual button (A complete 
  3268.   discussion of how to do this is left to books on the X Windows System). Key 
  3269.   binding (see "Key Binding" is one of the most useful of these resource 
  3270.   settable options. 
  3271.  
  3272.   X resources are usually specified in a file called .Xdefaults or .Xresources 
  3273.   in your home directory (on VMS this is sys$login:decw$xdefaults.dat). On 
  3274.   some systems, this file is read and its information attached to the X server 
  3275.   (your screen) when you start X. On other systems, the .Xdefaults file is 
  3276.   read each time you run an X program. When X resource values are attached to 
  3277.   the X server, changes to the resource file are not available to application 
  3278.   programs until you either run the xrdb program with the appropriate file as 
  3279.   input, or re-start the X server. 
  3280.  
  3281.  
  3282.   THE .NEDIT FILE
  3283.  
  3284.   The .nedit (saved preferences) file is in the same format as an X resource 
  3285.   file, and its contents can be moved into your X resource file. One reason 
  3286.   for doing so would be to attach server specific preferences, such as a 
  3287.   default font to a particular X server. Another reason for moving preferences 
  3288.   into the X resource file would be to keep preferences menu options and 
  3289.   resource settable options together in one place. Though the files are the 
  3290.   same format, additional resources should not be added to the .nedit file, 
  3291.   they will not be read, and NEdit modifies this file by overwriting it 
  3292.   completely. Note also that the contents of the .nedit file take precedence 
  3293.   over the values of X resources. Using Save Defaults after moving the 
  3294.   contents of your .nedit file to your .Xdefaults file will re-create the 
  3295.   .nedit file, interfering with the options that you have moved. 
  3296.  
  3297.  
  3298.   SELECTED X RESOURCE NAMES
  3299.  
  3300.   The following are selected NEdit resource names and default values for NEdit 
  3301.   options not settable via the Preferences menu (for preference resource 
  3302.   names, see your .nedit file): 
  3303.  
  3304. nedit.tagFile: (not defined) 
  3305.  
  3306.   This can be the name of a file, or multiple files separated by a colon (:) 
  3307.   character, of the type produced by Exuberant Ctags or the Unix ctags 
  3308.   command, which NEdit will load at startup time (see ctag support ). The tag 
  3309.   file provides a database from which NEdit can automatically open files 
  3310.   containing the definition of a particular subroutine or data type. 
  3311.  
  3312. nedit.alwaysCheckRelativeTagsSpecs: True
  3313.  
  3314.   When this resource is set to True, and there are tag files specified (with 
  3315.   the nedit.tagFile resource, see above) as relative paths, NEdit will 
  3316.   evaluate these tag value paths whenever a file is opened. All accessible tag 
  3317.   files will be loaded at this time. When this resource value is False, 
  3318.   relative path tag specifications will only be evaluated at NEdit startup 
  3319.   time. 
  3320.  
  3321. nedit.shell: /bin/csh 
  3322.  
  3323.   (Unix systems only) The Unix shell (command interpreter) to use for 
  3324.   executing commands from the Shell menu 
  3325.  
  3326. nedit.wordDelimiters: .,/\\`'!@#%^&*()-=+{}[]":;<>?
  3327.  
  3328.   The characters, in addition to blanks and tabs, which mark the boundaries 
  3329.   between words for the move-by-word (Ctrl+Arrow) and select-word (double 
  3330.   click) commands. Note that this default value may be overridden by the 
  3331.   setting in Preferences -> Default Settings -> Language Modes.... 
  3332.  
  3333. nedit.remapDeleteKey: False
  3334.  
  3335.   Setting this resource to True forcibly maps the delete key to backspace. 
  3336.   This can be helpful on systems where the bindings have become tangled, and 
  3337.   in environments which mix systems with PC style keyboards and systems with 
  3338.   DEC and Macintosh keyboards. Theoretically, these bindings should be made 
  3339.   using the standard X/Motif mechanisms, outside of NEdit. In practice, some 
  3340.   environments where users access several different systems remotely, can be 
  3341.   very hard to configure. If you've given up and are using a backspace key 
  3342.   halfway off the keyboard because you can't figure out the bindings, set this 
  3343.   to True. 
  3344.  
  3345. nedit.overrideDefaultVirtualKeyBindings: Auto
  3346.  
  3347.   Motif uses a virtual key binding mechanism that shares the bindings between 
  3348.   different Motif applications. When a first Motif application is started, it 
  3349.   installs some default virtual key bindings and any other Motif application 
  3350.   that runs afterwards, simply reuses them. Obviously, if the first 
  3351.   application installs an invalid set, all others applications may have 
  3352.   problems. 
  3353.  
  3354.   In the past, NEdit has been the victim of invalid bindings installed by 
  3355.   other applications several times. Through this resource, NEdit can be 
  3356.   instructed to ignore the bindings installed by other applications, and use 
  3357.   its own private bindings. By default, NEdit tries to detect invalid bindings 
  3358.   and ignore them automatically (Auto). Optionally, NEdit can be told to 
  3359.   always keep the installed bindings (Never), or to always override them 
  3360.   (Always). 
  3361.  
  3362. nedit.stdOpenDialog: False
  3363.  
  3364.   Setting this resource to True restores the standard Motif style of Open 
  3365.   dialog. NEdit file open dialogs are missing a text field at the bottom of 
  3366.   the dialog, where the file name can be entered as a string. The field is 
  3367.   removed in NEdit to encourage users to type file names in the list, a 
  3368.   non-standard, but much faster method for finding files. 
  3369.  
  3370. nedit.bgMenuButton: ~Shift~Ctrl~Meta~Alt<Btn3Down>
  3371.  
  3372.   Specification for mouse button / key combination to post the background menu 
  3373.   (in the form of an X translation table event specification). The event 
  3374.   specification should be as specific as possible, since it will override less 
  3375.   specific translation table entries. 
  3376.  
  3377. nedit.maxPrevOpenFiles: 30
  3378.  
  3379.   Number of files listed in the Open Previous sub-menu of the File menu. 
  3380.   Setting this to zero disables the Open Previous menu item and maintenance of 
  3381.   the .neditdb file. 
  3382.  
  3383. nedit.printCommand: (system specific)
  3384.  
  3385.   Command used by the print dialog to print a file, such as, lp, lpr, etc.. 
  3386.   The command must be capable of accepting input via stdin (standard input). 
  3387.  
  3388. nedit.printCopiesOption: (system specific)
  3389.  
  3390.   Option name used to specify multiple copies to the print command. If the 
  3391.   option should be separated from its argument by a space, leave a trailing 
  3392.   space. If blank, no "Number of Copies" item will appear in the print dialog. 
  3393.  
  3394. nedit.printQueueOption: (system specific)
  3395.  
  3396.   Option name used to specify a print queue to the print command. If the 
  3397.   option should be separated from its argument by a space, leave a trailing 
  3398.   space. If blank, no "Queue" item will appear in the print dialog. 
  3399.  
  3400. nedit.printNameOption: (system specific)
  3401.  
  3402.   Option name used to specify a job name to the print command. If the option 
  3403.   should be separated from its argument by a space, leave a trailing space. If 
  3404.   blank, no job or file name will be attached to the print job or banner page. 
  3405.  
  3406. nedit.printHostOption: (system specific)
  3407.  
  3408.   Option name used to specify a host name to the print command. If the option 
  3409.   should be separated from its argument by a space, leave a trailing space. If 
  3410.   blank, no "Host" item will appear in the print dialog. 
  3411.  
  3412. nedit.printDefaultQueue: (system specific)
  3413.  
  3414.   The name of the default print queue. Used only to display in the print 
  3415.   dialog, and has no effect on printing. 
  3416.  
  3417. nedit.visualID: Best
  3418.  
  3419.   If your screen supports multiple visuals (color mapping models), this 
  3420.   resource allows you to manually choose among them. The default value of 
  3421.   "Best" chooses the deepest (most colors) visual available. Since NEdit does 
  3422.   not depend on the specific characteristics of any given color model, Best 
  3423.   probably IS the best choice for everyone, and the only reason for setting 
  3424.   this resource would be to patch around some kind of X server problem. The 
  3425.   resource may also be set to "Default", which chooses the screen's default 
  3426.   visual (often a color-mapped, PseudoColor, visual for compatibility with 
  3427.   older X applications). It may also be set to a numeric visual-id value (use 
  3428.   xdpyinfo to see the list of visuals supported by your display), or a visual 
  3429.   class name: PseudoColor, DirectColor, TrueColor, etc.. 
  3430.  
  3431. nedit.installColormap: False
  3432.  
  3433.   Force the installation of a private colormap. If you have a humble 8-bit 
  3434.   color display, and netscape is hogging all of the color cells, you may want 
  3435.   to try turning this on. On most systems, this will result in colors flashing 
  3436.   wildly when you switch between NEdit and other applications. But a few 
  3437.   systems (SGI) have hardware support for multiple simultaneous colormaps, and 
  3438.   applications with installed colormaps are well behaved. 
  3439.  
  3440. nedit.findReplaceUsesSelection: False
  3441.  
  3442.   Controls if the Find and Replace dialogs are automatically loaded with the 
  3443.   contents of the primary selection. 
  3444.  
  3445. nedit.stickyCaseSenseButton: True
  3446.  
  3447.   Controls if the "Case Sensitive" buttons in the Find and Replace dialogs and 
  3448.   the incremental search bar maintain a separate state for literal and regular 
  3449.   expression searches. Moreover, when set to True, by default literal searches 
  3450.   are case insensitive and regular expression searches are case sensitive. 
  3451.   When set to False, the "Case Sensitive" buttons are independent of the 
  3452.   "Regular Expression" toggle. 
  3453.  
  3454. nedit.printDefaultHost: (system specific)
  3455.  
  3456.   The node name of the default print host. Used only to display in the print 
  3457.   dialog, and has no effect on printing. 
  3458.  
  3459. nedit.multiClickTime: (system specific)
  3460.  
  3461.   Maximum time in milliseconds allowed between mouse clicks within double and 
  3462.   triple click actions. 
  3463.  
  3464. nedit.scrollBarPlacement: BOTTOM_LEFT
  3465.  
  3466.   How scroll bars are placed in NEdit windows, as well as various lists and 
  3467.   text fields in the program. Other choices are: BOTTOM_RIGHT, TOP_LEFT, or 
  3468.   TOP_RIGHT. 
  3469.  
  3470. nedit.text.autoWrapPastedText: False
  3471.  
  3472.   When Auto Newline Wrap is turned on, apply automatic wrapping (which 
  3473.   normally only applies to typed text) to pasted text as well. 
  3474.  
  3475. nedit.text.heavyCursor: False
  3476.  
  3477.   For monitors with poor resolution or users who have difficulty seeing the 
  3478.   cursor, makes the cursor in the text editing area of the window heavier and 
  3479.   darker. 
  3480.  
  3481. nedit.text.foreground: black
  3482.  
  3483.   Foreground color of the text editing area of the NEdit window. 
  3484.  
  3485. nedit.text.background: white
  3486.  
  3487.   Background color of the text editing area of the NEdit window. 
  3488.  
  3489. nedit.text.selectForeground: black
  3490.  
  3491.   Foreground (text) color for selections in the text editing area of the NEdit 
  3492.   window. 
  3493.  
  3494. nedit.text.selectBackground: gray80
  3495.  
  3496.   Color for selections in the text editing area of the NEdit window. 
  3497.  
  3498. nedit.text.highlightForeground: white
  3499.  
  3500.   Foreground (text) color for highlights (parenthesis flashing) in the text 
  3501.   editing area of the NEdit window. 
  3502.  
  3503. nedit.text.highlightBackground: red
  3504.  
  3505.   Color for highlights (parenthesis flashing) in the text editing area of the 
  3506.   NEdit window. 
  3507.  
  3508. nedit.text.cursorForeground: black
  3509.  
  3510.   Color for text cursor in the text editing area of the NEdit window. 
  3511.  
  3512. nedit.text.lineNumForeground: gray47
  3513.  
  3514.   Color for displaying line numbers in the NEdit window. 
  3515.  
  3516. nedit.text.blinkRate: 500
  3517.  
  3518.   Blink rate of the text insertion cursor in milliseconds. Set to zero to stop 
  3519.   blinking. 
  3520.  
  3521. nedit.text.Translations:
  3522.  
  3523.   Modifies key bindings (see below). 
  3524.  
  3525. nedit.foreground: black
  3526.  
  3527.   Default foreground color for menus, dialogs, scroll bars, etc.. 
  3528.  
  3529. nedit.background: #b3b3b3
  3530.  
  3531.   Default background color for menus, dialogs, scroll bars, etc.. 
  3532.  
  3533. nedit.fontList: helvetica medium 12 points
  3534.  
  3535.   Default font for menus, dialogs, scroll bars, etc.. 
  3536.  
  3537. nedit.helpFont: helvetica medium 12 points
  3538.  
  3539.   Font used for displaying online help. 
  3540.  
  3541. nedit.boldHelpFont: helvetica bold 12 points
  3542.  
  3543.   Bold font for online help. 
  3544.  
  3545. nedit.italicHelpFont: helvetica italic 12 points
  3546.  
  3547.   Italic font for online help. 
  3548.  
  3549. nedit.fixedHelpFont: courier medium 12 points
  3550.  
  3551.   Fixed font for online help. 
  3552.  
  3553. nedit.boldFixedHelpFont: courier bold 12 points
  3554.  
  3555.   Fixed bold for online help. 
  3556.  
  3557. nedit.italicFixedHelpFont: courier italic 12 points
  3558.  
  3559.   Fixed italic font for online help. 
  3560.  
  3561. nedit.h1HelpFont: helvetica bold 14 points
  3562.  
  3563.   Font for level-1 titles in help text. 
  3564.  
  3565. nedit.h2HelpFont: helvetica bold italic 12 points
  3566.  
  3567.   Font for level-2 titles in help text. 
  3568.  
  3569. nedit.h3HelpFont: courier bold 12 points
  3570.  
  3571.   Font for level-3 titles in help text. 
  3572.  
  3573. nedit.helpLinkFont: helvetica medium 12 points
  3574.  
  3575.   Font for hyperlinks in the help text 
  3576.  
  3577. nedit.helpLinkColor: #009900
  3578.  
  3579.   Color for hyperlinks in the help text 
  3580.  
  3581. nc.autoStart: False 
  3582.  
  3583.   Whether the nc program should automatically start an NEdit server (without 
  3584.   prompting the user) if an appropriate server is not found. 
  3585.  
  3586. nc.serverCommand: nedit -server
  3587.  
  3588.   Command used by the nc program to start an NEdit server. 
  3589.  
  3590.    and other characteristics):
  3591.   The following are Selected widget names (to which you may append 
  3592.   .background, .foreground, .fontList, etc., to change colors, fonts 
  3593.  
  3594. nedit*statsForm
  3595.  
  3596.   Statistics line and incremental search bar. Use this to set statistics line 
  3597.   background color. To set attributes affecting both the statistics line and 
  3598.   the incremental search bar, use '*' rather than '.' to separate the resource 
  3599.   name. For example, to set the foreground color of both components: 
  3600.   nedit*statsForm*foreground, or to set the foreground color of the statistics 
  3601.   line only: nedit*statsForm.statsLine.foreground. 
  3602.  
  3603. nedit*menuBar
  3604.  
  3605.   Top-of-window menu-bar. 
  3606.  
  3607. nedit*textHorScrollBar
  3608.  
  3609.   Horizontal scroll bar. 
  3610.  
  3611. nedit*textVertScrollBar
  3612.  
  3613.   Vertical scroll bar. 
  3614.  
  3615. -----------
  3616. KEY BINDING
  3617. -----------
  3618.  
  3619.   There are several ways to change key bindings in NEdit. The easiest way to 
  3620.   add a new key binding in NEdit is to define a macro in Preferences -> 
  3621.   Default Settings -> Customize Menus -> Macro Menu. However, if you want to 
  3622.   change existing bindings or add a significant number of new key bindings you 
  3623.   will need to do so via X resources. 
  3624.  
  3625.   Before reading this section, you must understand how to set X resources (see 
  3626.   the help section "X Resources"). Since setting X resources is tricky, it is 
  3627.   also helpful when working on key-binding, to set some easier-to-verify 
  3628.   resource at the same time, as a simple check that the NEdit program is 
  3629.   actually seeing your changes. The appres program is also very helpful in 
  3630.   checking that the resource settings that you make, actually reach the 
  3631.   program for which they are intended in the correct form. 
  3632.  
  3633.  
  3634.   KEY BINDING IN GENERAL
  3635.  
  3636.   Keyboard commands are associated with editor action routines through two 
  3637.   separate mechanisms in NEdit. Commands which appear in pull-down menus have 
  3638.   individual resources designating a keyboard equivalent to the menu command, 
  3639.   called an accelerator key. Commands which do not have an associated menu 
  3640.   item are bound to keys via the X toolkit translation mechanism. The methods 
  3641.   for changing these two kinds of bindings are quite different. 
  3642.  
  3643.  
  3644.   KEY BINDING VIA TRANSLATIONS
  3645.  
  3646.   The most general way to bind actions to keys in NEdit is to use the 
  3647.   translation table associated with the text widget. To add a binding to Alt+Y 
  3648.   to insert the string "Hi!", for example, add lines similar to the following 
  3649.   to your X resource file: 
  3650.  
  3651.     NEdit*text.Translations: #override \n\
  3652.       Alt<Key>y: insert_string("Hi!") \n
  3653.  
  3654.   The Help topic "Action Routines" lists the actions available to be bound. 
  3655.  
  3656.   Translation tables map key and mouse presses, window operations, and other 
  3657.   kinds of events, to actions. The syntax for translation tables is simplified 
  3658.   here, so you may need to refer to a book on the X window system for more 
  3659.   detailed information. 
  3660.  
  3661.   Note that accelerator resources (discussed below) override translations, and 
  3662.   that most Ctrl+letter and Alt+letter combinations are already bound to an 
  3663.   accelerator key. To use one of these combinations from a translation table, 
  3664.   therefore, you must first un-bind the original menu accelerator. 
  3665.  
  3666.   A resource for changing a translation table consists of a keyword; 
  3667.   #override, #augment, or #replace; followed by lines (separated by newline 
  3668.   characters) pairing events with actions. Events begin with modifiers, like 
  3669.   Ctrl, Shift, or Alt, followed by the event type in <>. BtnDown, Btn1Down, 
  3670.   Btn2Down, Btn1Up, Key, KeyUp are valid event types. For key presses, the 
  3671.   event type is followed by the name of the key. You can specify a combination 
  3672.   of events, such as a sequence of key presses, by separating them with 
  3673.   commas. The other half of the event/action pair is a set of actions. These 
  3674.   are separated from the event specification by a colon and from each other by 
  3675.   spaces. Actions are names followed by parentheses, optionally containing one 
  3676.   or more parameters separated by comas. 
  3677.  
  3678.  
  3679.   CHANGING MENU ACCELERATOR KEYS
  3680.  
  3681.   The menu shortcut keys shown at the right of NEdit menu items can also be 
  3682.   changed via X resources. Each menu item has two resources associated with 
  3683.   it, accelerator, the event to trigger the menu item; and acceleratorText, 
  3684.   the string shown in the menu. The form of the accelerator resource is the 
  3685.   same as events for translation table entries discussed above, though 
  3686.   multiple keys and other subtleties are not allowed. The resource name for a 
  3687.   menu is the title in lower case, followed by "Menu", the resource name of 
  3688.   menu item is the name in lower case, run together, with words separated by 
  3689.   caps, and all punctuation removed. For example, to change Cut to Ctrl+X, you 
  3690.   would add the following to your .Xdefaults file: 
  3691.  
  3692.       nedit*editMenu.cut.accelerator: Ctrl<Key>x
  3693.       nedit*editMenu.cut.acceleratorText: Ctrl+X
  3694.  
  3695.   Accelerator keys with optional shift key modifiers, like Find..., have an 
  3696.   additional accelerator resource with Shift appended to the name. For 
  3697.   example: 
  3698.  
  3699.       nedit*searchMenu.find.acceleratorText: [Shift]Alt+F
  3700.       nedit*searchMenu.find.accelerator: Alt<Key>f
  3701.       nedit*searchMenu.findShift.accelerator: Shift Alt<Key>f
  3702.  
  3703. ---------------------
  3704. HIGHLIGHTING PATTERNS
  3705. ---------------------
  3706.  
  3707.  
  3708.   WRITING SYNTAX HIGHLIGHTING PATTERNS
  3709.  
  3710.   Patterns are the mechanism by which language syntax highlighting is 
  3711.   implemented in NEdit (see Syntax Highlighting under the heading of Features 
  3712.   for Programming). To create syntax highlighting patterns for a new language, 
  3713.   or to modify existing patterns, select "Recognition Patterns" from "Syntax 
  3714.   Highlighting" sub-section of the "Default Settings" sub-menu of the 
  3715.   "Preferences" menu. 
  3716.  
  3717.   First, a word of caution. As with regular expression matching in general, it 
  3718.   is quite possible to write patterns which are so inefficient that they 
  3719.   essentially lock up the editor as they recursively re-examine the entire 
  3720.   contents of the file thousands of times. With the multiplicity of patterns, 
  3721.   the possibility of a lock-up is significantly increased in syntax 
  3722.   highlighting. When working on highlighting patterns, be sure to save your 
  3723.   work frequently. 
  3724.  
  3725.   NEdit's syntax highlighting is unusual in that it works in real-time (as you 
  3726.   type), and yet is completely programmable using standard regular expression 
  3727.   notation. Other syntax highlighting editors usually fall either into the 
  3728.   category of fully programmable but unable to keep up in real-time, or 
  3729.   real-time but limited programmability. The additional burden that NEdit 
  3730.   places on pattern writers in order to achieve this speed/flexibility mix, is 
  3731.   to force them to state self-imposed limitations on the amount of context 
  3732.   that patterns may examine when re-parsing after a change. While the "Pattern 
  3733.   Context Requirements" heading is near the end of this section, it is not 
  3734.   optional, and must be understood before making any any serious effort at 
  3735.   pattern writing. 
  3736.  
  3737.   In its simplest form, a highlight pattern consists of a regular expression 
  3738.   to match, along with a style representing the font an color for displaying 
  3739.   any text which matches that expression. To bold the word, "highlight", 
  3740.   wherever it appears the text, the regular expression simply would be the 
  3741.   word "highlight". The style (selected from the menu under the heading of 
  3742.   "Highlight Style") determines how the text will be drawn. To bold the text, 
  3743.   either select an existing style, such as "Keyword", which bolds text, or 
  3744.   create a new style and select it under Highlight Style. 
  3745.  
  3746.   The full range of regular expression capabilities can be applied in such a 
  3747.   pattern, with the single caveat that the expression must conclusively match 
  3748.   or not match, within the pre-defined context distance (as discussed below 
  3749.   under Pattern Context Requirements). 
  3750.  
  3751.   To match longer ranges of text, particularly any constructs which exceed the 
  3752.   requested context, you must use a pattern which highlights text between a 
  3753.   starting and ending regular expression match. To do so, select "Highlight 
  3754.   text between starting and ending REs" under "Matching", and enter both a 
  3755.   starting and ending regular expression. For example, to highlight everything 
  3756.   between double quotes, you would enter a double quote character in both the 
  3757.   starting and ending regular expression fields. Patterns with both a 
  3758.   beginning and ending expression span all characters between the two 
  3759.   expressions, including newlines. 
  3760.  
  3761.   Again, the limitation for automatic parsing to operate properly is that both 
  3762.   expressions must match within the context distance stated for the pattern 
  3763.   set. 
  3764.  
  3765.   With the ability to span large distances, comes the responsibility to 
  3766.   recover when things go wrong. Remember that syntax highlighting is called 
  3767.   upon to parse incorrect or incomplete syntax as often as correct syntax. To 
  3768.   stop a pattern short of matching its end expression, you can specify an 
  3769.   error expression, which stops the pattern from gobbling up more than it 
  3770.   should. For example, if the text between double quotes shouldn't contain 
  3771.   newlines, the error expression might be "$". As with both starting and 
  3772.   ending expressions, error expressions must also match within the requested 
  3773.   context distance. 
  3774.  
  3775.  
  3776.   Coloring Sub-Expressions
  3777.  
  3778.   It is also possible to color areas of text within a regular expression 
  3779.   match. A pattern of this type associates a style with sub-expressions 
  3780.   references of the parent pattern (as used in regular expression substitution 
  3781.   patterns, see the NEdit Help menu item on Regular Expressions). 
  3782.   Sub-expressions of both the starting and ending patterns may be colored. For 
  3783.   example, if the parent pattern has a starting expression "\<", and end 
  3784.   expression "\>", (for highlighting all of the text contained within angle 
  3785.   brackets), a sub-pattern using "&" in both the starting and ending 
  3786.   expression fields could color the brackets differently from the intervening 
  3787.   text. A quick shortcut to typing in pattern names in the Parent Pattern 
  3788.   field is to use the middle mouse button to drag them from the Patterns list. 
  3789.  
  3790.  
  3791.   Hierarchical Patterns
  3792.  
  3793.   A hierarchical sub-pattern, is identical to a top level pattern, but is 
  3794.   invoked only between the beginning and ending expression matches of its 
  3795.   parent pattern. Like the sub-expression coloring patterns discussed above, 
  3796.   it is associated with a parent pattern using the Parent Pattern field in the 
  3797.   pattern specification. Pattern names can be dragged from the pattern list 
  3798.   with the middle mouse button to the Parent Pattern field. 
  3799.  
  3800.   After the start expression of the parent pattern matches, the syntax 
  3801.   highlighting parser searches for either the parent's end pattern or a 
  3802.   matching sub-pattern. When a sub-pattern matches, control is not returned to 
  3803.   the parent pattern until the entire sub-pattern has been parsed, regardless 
  3804.   of whether the parent's end pattern appears in the text matched by the 
  3805.   sub-pattern. 
  3806.  
  3807.   The most common use for this capability is for coloring sub-structure of 
  3808.   language constructs (smaller patterns embedded in larger patterns). 
  3809.   Hierarchical patterns can also simplify parsing by having sub-patterns 
  3810.   "hide" special syntax from parent patterns, such as special escape sequences 
  3811.   or internal comments. 
  3812.  
  3813.   There is no depth limit in nesting hierarchical sub-patterns, but beyond the 
  3814.   third level of nesting, automatic re-parsing will sometimes have to re-parse 
  3815.   more than the requested context distance to guarantee a correct parse (which 
  3816.   can slow down the maximum rate at which the user can type if large sections 
  3817.   of text are matched only by deeply nested patterns). 
  3818.  
  3819.   While this is obviously not a complete hierarchical language parser it is 
  3820.   still useful in many text coloring situations. As a pattern writer, your 
  3821.   goal is not to completely cover the language syntax, but to generate 
  3822.   colorings that are useful to the programmer. Simpler patterns are usually 
  3823.   more efficient and also more robust when applied to incorrect code. 
  3824.  
  3825.  
  3826.   Deferred (Pass-2) Parsing
  3827.  
  3828.   NEdit does pattern matching for syntax highlighting in two passes. The first 
  3829.   pass is applied to the entire file when syntax highlighting is first turned 
  3830.   on, and to new ranges of text when they are initially read or pasted in. The 
  3831.   second pass is applied only as needed when text is exposed (scrolled in to 
  3832.   view). 
  3833.  
  3834.   If you have a particularly complex set of patterns, and parsing is beginning 
  3835.   to add a noticeable delay to opening files or operations which change large 
  3836.   regions of text, you can defer some of that parsing from startup time, to 
  3837.   when it is actually needed for viewing the text. Deferred parsing can only 
  3838.   be used with single expression patterns, or begin/end patterns which match 
  3839.   entirely within the requested context distance. To defer the parsing of a 
  3840.   pattern to when the text is exposed, click on the Pass-2 pattern type button 
  3841.   in the highlight patterns dialog. 
  3842.  
  3843.   Sometimes a pattern can't be deferred, not because of context requirements, 
  3844.   but because it must run concurrently with pass-1 (non-deferred) patterns. If 
  3845.   they didn't run concurrently, a pass-1 pattern might incorrectly match some 
  3846.   of the characters which would normally be hidden inside of a sequence 
  3847.   matched by the deferred pattern. For example, C has character constants 
  3848.   enclosed in single quotes. These typically do not cross line boundaries, 
  3849.   meaning they can be parsed entirely within the context distance of the C 
  3850.   pattern set and should be good candidates for deferred parsing. However, 
  3851.   they can't be deferred because they can contain sequences of characters 
  3852.   which can trigger pass-one patterns. Specifically, the sequence, '\"', 
  3853.   contains a double quote character, which would be matched by the string 
  3854.   pattern and interpreted as introducing a string. 
  3855.  
  3856.  
  3857.   Pattern Context Requirements
  3858.  
  3859.   The context requirements of a pattern set state how much additional text 
  3860.   around any change must be examined to guarantee that the patterns will match 
  3861.   what they are intended to match. Context requirements are a promise by NEdit 
  3862.   to the pattern writer, that the regular expressions in his/her patterns will 
  3863.   be matched against at least <line context> lines and <character context> 
  3864.   characters, around any modified text. Combining line and character 
  3865.   requirements guarantee that both will be met. 
  3866.  
  3867.   Automatic re-parsing happens on EVERY KEYSTROKE, so the amount of context 
  3868.   which must be examined is very critical to typing efficiency. The more 
  3869.   complicated your patterns, the more critical the context becomes. To cover 
  3870.   all of the keywords in a typical language, without affecting the maximum 
  3871.   rate at which users can enter text, you may be limited to just a few lines 
  3872.   and/or a few hundred characters of context. 
  3873.  
  3874.   The default context distance is 1 line, with no minimum character 
  3875.   requirement. There are several benefits to sticking with this default. One 
  3876.   is simply that it is easy to understand and to comply with. Regular 
  3877.   expression notation is designed around single line matching. To span lines 
  3878.   in a regular expression, you must explicitly mention the newline character 
  3879.   "\n", and matches which are restricted to a single line are virtually immune 
  3880.   to lock-ups. Also, if you can code your patterns to work within a single 
  3881.   line of context, without an additional character-range context requirement, 
  3882.   the parser can take advantage the fact that patterns don't cross line 
  3883.   boundaries, and nearly double its efficiency over a one-line and 1-character 
  3884.   context requirement. (In a single line context, you are allowed to match 
  3885.   newlines, but only as the first and/or last character.) 
  3886.  
  3887. -------------------
  3888. SMART INDENT MACROS
  3889. -------------------
  3890.  
  3891.   Smart indent macros can be written for any language, but are usually more 
  3892.   difficult to write than highlighting patterns. A good place to start, of 
  3893.   course, is to look at the existing macros for C and C++. 
  3894.  
  3895.   Smart indent macros for a language mode consist of standard NEdit macro 
  3896.   language code attached to any or all of the following three activation 
  3897.   conditions: 1) When smart indent is first turned on for a text window 
  3898.   containing code of the language, 2) When a newline is typed and smart indent 
  3899.   is expected, 3) after any character is typed. To attach macro code to any of 
  3900.   these code "hooks", enter it in the appropriate section in the Preferences 
  3901.   -> Default Settings -> Auto Indent -> Program Smart Indent dialog. 
  3902.  
  3903.   Typically most of the code should go in the initialization section, because 
  3904.   that is the appropriate place for subroutine definitions, and smart indent 
  3905.   macros are complicated enough that you are not likely to want to write them 
  3906.   as one monolithic run of code. You may also put code in the Common/Shared 
  3907.   Initialization section (accessible through the button in the upper left 
  3908.   corner of the dialog). Unfortunately, since the C/C++ macros also reside in 
  3909.   the common/shared section, when you add code there, you run some risk of 
  3910.   missing out on future upgrades to these macros, because your changes will 
  3911.   override the built-in defaults. 
  3912.  
  3913.   The newline macro is invoked after the user types a newline, but before the 
  3914.   newline is entered in the buffer. It takes a single argument ($1) which is 
  3915.   the position at which the newline will be inserted. It must return the 
  3916.   number of characters of indentation the line should have, or -1. A return 
  3917.   value of -1 means to do a standard auto-indent. You must supply a newline 
  3918.   macro, but the code: "return -1" (auto-indent), or "return 0" (no indent) is 
  3919.   sufficient. 
  3920.  
  3921.   The type-in macro takes two arguments. $1 is the insert position, and $2 is 
  3922.   the character just inserted, and does not return a value. You can do just 
  3923.   about anything here, but keep in mind that this macro is executed for every 
  3924.   keystroke typed, so if you try to get too fancy, you may degrade 
  3925.   performance. 
  3926.  
  3927. ------------------
  3928. NEDIT COMMAND LINE
  3929. ------------------
  3930.  
  3931.    nedit [-read] [-create] [-line n | +n] [-server]
  3932.       [-do command] [-tags file] [-tabs n] [-wrap]
  3933.       [-nowrap] [-autowrap] [-autoindent] [-noautoindent]
  3934.       [-autosave] [-noautosave] [-rows n] [-columns n]
  3935.       [-font font] [-lm languagemode] [-geometry geometry]
  3936.       [-iconic] [-noiconic] [-display [host]:server[.screen]
  3937.       [-xrm resourcestring] [-svrname name] [-import file]
  3938.       [-background color] [-foreground color] [-V|-version]
  3939.       [--] [file...]
  3940.  
  3941. -read
  3942.   Open the file Read Only regardless of the actual file protection. 
  3943.  
  3944. -create
  3945.   Don't warn about file creation when a file doesn't exist. 
  3946.  
  3947. -line n (or +n)
  3948.   Go to line number n 
  3949.  
  3950. -server
  3951.   Designate this session as an NEdit server, for processing commands from the 
  3952.   nc program. nc can be used to interface NEdit to code development 
  3953.   environments, mailers, etc., or just as a quick way to open files from the 
  3954.   shell command line without starting a new NEdit session. 
  3955.  
  3956. -do command
  3957.   Execute an NEdit macro or action. On each file following the -do argument on 
  3958.   the command line. -do is particularly useful from the nc program, where nc 
  3959.   -do can remotely execute commands in an NEdit -server session. 
  3960.  
  3961. -tags file
  3962.   Load a file of directions for finding definitions of program subroutines and 
  3963.   data objects. The file must be of the format gen- erated by Exuberant Ctags, 
  3964.   or the standard Unix ctags command. 
  3965.  
  3966. -tabs n
  3967.   Set tab stops every n characters. 
  3968.  
  3969. -wrap, -nowrap
  3970.   Wrap long lines at the right edge of the window rather than continuing them 
  3971.   past it. (Continuous Wrap mode) 
  3972.  
  3973. -autowrap, -noautowrap
  3974.   Wrap long lines when the cursor reaches the right edge of the window by 
  3975.   inserting newlines at word boundaries. (Auto Newline Wrap mode) 
  3976.  
  3977. -autoindent, -noautoindent
  3978.   Maintain a running indent. 
  3979.  
  3980. -autosave, -noautosave
  3981.   Maintain a backup copy of the file being edited under the name '~filename'. 
  3982.  
  3983. -rows n
  3984.   Default height in characters for an editing window. 
  3985.  
  3986. -columns n
  3987.   Default width in characters for an editing window. 
  3988.  
  3989. -font font (or -fn font)
  3990.   Font for text being edited (Font for menus and dialogs can be set with -xrm 
  3991.   "*fontList:font"). 
  3992.  
  3993. -lm languagemode
  3994.   Initial language mode used for editing succeeding files. 
  3995.  
  3996. -geometry geometry (or -g geometry)
  3997.   The initial size and/or location of editor windows. The argument geometry 
  3998.   has the form: 
  3999.  
  4000.    [<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]
  4001.  
  4002.   where <width> and <height> are the desired width and height of the window, 
  4003.   and <xoffset> and <yoffset> are the distance from the edge of the screen to 
  4004.   the window, + for top or left, - for bottom or right. -geometry can be 
  4005.   specified for individual files on the command line. 
  4006.  
  4007. -iconic, -noiconic
  4008.   Initial window state for succeeding files. 
  4009.  
  4010. -display [host]:server[.screen]
  4011.   The name of the X server to use. host specifies the machine, server 
  4012.   specifies the display server number, and screen specifies the screen number. 
  4013.   host or screen can be omitted and default to the local machine, and screen 
  4014.   0. 
  4015.  
  4016. -background color (or -bg color)
  4017.   Background color. (background color for text can be set separately with -xrm 
  4018.   "nedit*text.background: color"). 
  4019.  
  4020. -foreground color (or -fg color)
  4021.   Foreground color. (foreground color for text can be set separately with -xrm 
  4022.   "nedit*text.foreground: color"). 
  4023.  
  4024. -xrm resourcestring 
  4025.   Set the value of an X resource to override a default value (see "Customizing 
  4026.   NEdit"). 
  4027.  
  4028. -svrname name
  4029.   When starting NEdit in server mode, name the server, such that it responds 
  4030.   to requests only when nc is given a corresponding -svrname argument. By 
  4031.   naming servers, you can run several simultaneously, and direct files and 
  4032.   commands specifically to any one. 
  4033.  
  4034. -import file
  4035.   Loads an additional preferences file on top of the existing defaults saved 
  4036.   in your .nedit file. To incorporate macros, language modes, and highlight 
  4037.   patterns and styles written by other users, run NEdit with -import <file>, 
  4038.   then re-save your .nedit file with Preferences -> Save Defaults. 
  4039.  
  4040. -version
  4041.   Prints out the NEdit version information. The -V option is synonymous. 
  4042.  
  4043. --
  4044.   Treats all subsequent arguments as file names, even if they start with a 
  4045.   dash. This is so NEdit can access files that begin with the dash character. 
  4046.  
  4047.  
  4048. ------------------
  4049. CLIENT/SERVER MODE
  4050. ------------------
  4051.  
  4052.   NEdit can be operated on its own, or as a two-part client/server 
  4053.   application. Client/server mode is useful for integrating NEdit with 
  4054.   software development environments, mailers, and other programs; or just as a 
  4055.   quick way to open files from the shell command line without starting a new 
  4056.   NEdit session. 
  4057.  
  4058.   To run NEdit in server mode, type: 
  4059.  
  4060.       nedit -server
  4061.  
  4062.   NEdit can also be started in server mode via the Nedit Client (nc) program 
  4063.   when no servers are available. 
  4064.  
  4065.   The nc program, which is distributed along with NEdit, sends commands to an 
  4066.   nedit server to open files, select lines, or execute editor actions. It 
  4067.   accepts a limited set of the nedit command line options: -read, -create, 
  4068.   -line (or +n), -do, and a list of file names. Listing a file on the nc 
  4069.   command line means, open it if it is not already open and bring the window 
  4070.   to the front. -read and -create affect only newly opened files, but -line 
  4071.   and -do can also be used on files which are already open (See "NEdit Command 
  4072.   Line" for more information). 
  4073.  
  4074.   In typical Unix style, arguments affect the files which follow them on the 
  4075.   command line, for example: 
  4076.  
  4077.       incorrect:   nc file.c -line 25
  4078.       correct:     nc -line 25 file.c
  4079.  
  4080.   -read, -create, and -line affect all of the files which follow them on the 
  4081.   command line. The -do macro is executed only once, on the next file on the 
  4082.   line. -do without a file following it on the command line, executes the 
  4083.   macro on the first available window (presumably when you give a -do command 
  4084.   without a corresponding file or window, you intend it to do something 
  4085.   independent of the window in which it happens to execute). 
  4086.  
  4087.   nc also accepts one command line option of its own, -noask (or -ask), which 
  4088.   instructs it whether to automatically start a server if one is not 
  4089.   available. This is also settable via the X resource, nc.autoStart (See "X 
  4090.   Resources" section). 
  4091.  
  4092.   Sometimes it is useful to have more than one NEdit server running, for 
  4093.   example to keep mail and programming work separate. The option, -svrname, to 
  4094.   both nedit and nc, allows you to start, and communicate with, separate named 
  4095.   servers. A named server responds only to requests with the corresponding 
  4096.   -svrname argument. If you use ClearCase and are within a ClearCase view, the 
  4097.   server name will default to the name of the view (based on the value of the 
  4098.   CLEARCASE_ROOT environment variable). 
  4099.  
  4100.   Communication between nc and nedit is through the X display. So as long as X 
  4101.   windows is set up and working properly, nc will work properly as well. nc 
  4102.   uses the DISPLAY environment variable, the machine name and your user name 
  4103.   to find the appropriate server, meaning, if you have several machines 
  4104.   sharing a common file system, nc will not be able to find a server that is 
  4105.   running on a machine with a different host name, even though it may be 
  4106.   perfectly appropriate for editing a given file. 
  4107.  
  4108.   The command which nc uses to start an nedit server is settable via the X 
  4109.   resource nc.serverCommand, by default, "nedit -server". 
  4110.  
  4111. --------------
  4112. CRASH RECOVERY
  4113. --------------
  4114.  
  4115.   If a system crash, network failure, X server crash, or program error should 
  4116.   happen while you are editing a file, you can still recover most of your 
  4117.   work. NEdit maintains a backup file which it updates periodically (every 8 
  4118.   editing operations or 80 characters typed). This file has the same name as 
  4119.   the file that you are editing, but with the character `~' (tilde) on Unix or 
  4120.   `_' (underscore) on VMS prefixed to the name. To recover a file after a 
  4121.   crash, simply rename the file to remove the tilde or underscore character, 
  4122.   replacing the older version of the file. (Because several of the Unix shells 
  4123.   consider the tilde to be a special character, you may have to prefix the 
  4124.   character with a `\' (backslash) when you move or delete an NEdit backup 
  4125.   file.) 
  4126.  
  4127.   Example, to recover the file called "help.c" on Unix type the command: 
  4128.  
  4129.       mv \~help.c help.c
  4130.  
  4131.   A minor caveat, is that if the file you were editing was in MS DOS format, 
  4132.   the backup file will be in Unix format, and you will need to open the backup 
  4133.   file in NEdit and change the file format back to MS DOS via the Save As... 
  4134.   dialog (or use the Unix unix2dos command outside of NEdit). 
  4135.  
  4136. -------
  4137. VERSION
  4138. -------
  4139.  
  4140. NEdit 5.3
  4141. Jun 1, 2002
  4142.  
  4143.   NEdit was written by Mark Edel, Joy Kyriakopulos, Christopher Conrad, Jim 
  4144.   Clark, Arnulfo Zepeda-Navratil, Suresh Ravoor, Tony Balinski, Max Vohlken, 
  4145.   Yunliang Yu, Donna Reid, Arne F°rlie, Eddy De Greef, Steve LoBasso, 
  4146.   Alexander Mai, Scott Tringali, Thorsten Haude, and Steve Haehn. 
  4147.  
  4148.   The regular expression matching routines used in NEdit are adapted (with 
  4149.   permission) from original code written by Henry Spencer at the University of 
  4150.   Toronto. 
  4151.  
  4152.   Syntax highlighting patterns and smart indent macros were contributed by: 
  4153.   Simon T. MacDonald, Maurice Leysens, Matt Majka, Alfred Smeenk, Alain 
  4154.   Fargues, Christopher Conrad, Scott Markinson, Konrad Bernloehr, Ivan Herman, 
  4155.   Patrice Venant, Christian Denat, Philippe Couton, Max Vohlken, Markus 
  4156.   Schwarzenberg, Himanshu Gohel, Steven C. Kapp, Michael Turomsha, John 
  4157.   Fieber, Chris Ross, Nathaniel Gray, Joachim Lous, Mike Duigou, Seak 
  4158.   Teng-Fong, Joor Loohuis, Mark Jones, and Niek van den Berg. 
  4159.  
  4160.   NEdit sources, executables, additional documentation, and contributed 
  4161.   software are available from the NEdit web site at http://www.nedit.org. 
  4162.  
  4163.   This program is free software; you can redistribute it and/or modify it 
  4164.   under the terms of the GNU General Public License as published by the Free 
  4165.   Software Foundation; either version 2 of the License, or (at your option) 
  4166.   any later version. 
  4167.  
  4168.   This program is distributed in the hope that it will be useful, but WITHOUT 
  4169.   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
  4170.   FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in the 
  4171.   Help section "Distribution Policy" for more details. 
  4172.  
  4173. -------------------
  4174. DISTRIBUTION POLICY
  4175. -------------------
  4176.  
  4177.   GNU GENERAL PUBLIC LICENSE 
  4178.  
  4179.   Version 2, June 1991 
  4180.  
  4181.   Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, 
  4182.   Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute 
  4183.   verbatim copies of this license document, but changing it is not allowed. 
  4184.  
  4185.   Preamble 
  4186.  
  4187.   The licenses for most software are designed to take away your freedom to 
  4188.   share and change it. By contrast, the GNU General Public License is intended 
  4189.   to guarantee your freedom to share and change free software--to make sure 
  4190.   the software is free for all its users. This General Public License applies 
  4191.   to most of the Free Software Foundation's software and to any other program 
  4192.   whose authors commit to using it. (Some other Free Software Foundation 
  4193.   software is covered by the GNU Library General Public License instead.) You 
  4194.   can apply it to your programs, too. 
  4195.  
  4196.   When we speak of free software, we are referring to freedom, not price. Our 
  4197.   General Public Licenses are designed to make sure that you have the freedom 
  4198.   to distribute copies of free software (and charge for this service if you 
  4199.   wish), that you receive source code or can get it if you want it, that you 
  4200.   can change the software or use pieces of it in new free programs; and that 
  4201.   you know you can do these things. 
  4202.  
  4203.   To protect your rights, we need to make restrictions that forbid anyone to 
  4204.   deny you these rights or to ask you to surrender the rights. These 
  4205.   restrictions translate to certain responsibilities for you if you distribute 
  4206.   copies of the software, or if you modify it. 
  4207.  
  4208.   For example, if you distribute copies of such a program, whether gratis or 
  4209.   for a fee, you must give the recipients all the rights that you have. You 
  4210.   must make sure that they, too, receive or can get the source code. And you 
  4211.   must show them these terms so they know their rights. 
  4212.  
  4213.   We protect your rights with two steps: (1) copyright the software, and (2) 
  4214.   offer you this license which gives you legal permission to copy, distribute 
  4215.   and/or modify the software. 
  4216.  
  4217.   Also, for each author's protection and ours, we want to make certain that 
  4218.   everyone understands that there is no warranty for this free software. If 
  4219.   the software is modified by someone else and passed on, we want its 
  4220.   recipients to know that what they have is not the original, so that any 
  4221.   problems introduced by others will not reflect on the original authors' 
  4222.   reputations. 
  4223.  
  4224.   Finally, any free program is threatened constantly by software patents. We 
  4225.   wish to avoid the danger that redistributors of a free program will 
  4226.   individually obtain patent licenses, in effect making the program 
  4227.   proprietary. To prevent this, we have made it clear that any patent must be 
  4228.   licensed for everyone's free use or not licensed at all. 
  4229.  
  4230.   The precise terms and conditions for copying, distribution and modification 
  4231.   follow. 
  4232.  
  4233.   GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION 
  4234.   AND MODIFICATION 
  4235.  
  4236.   0. This License applies to any program or other work which contains a notice 
  4237.   placed by the copyright holder saying it may be distributed under the terms 
  4238.   of this General Public License. The "Program", below, refers to any such 
  4239.   program or work, and a "work based on the Program" means either the Program 
  4240.   or any derivative work under copyright law: that is to say, a work 
  4241.   containing the Program or a portion of it, either verbatim or with 
  4242.   modifications and/or translated into another language. (Hereinafter, 
  4243.   translation is included without limitation in the term "modification".) Each 
  4244.   licensee is addressed as "you". 
  4245.  
  4246.   Activities other than copying, distribution and modification are not covered 
  4247.   by this License; they are outside its scope. The act of running the Program 
  4248.   is not restricted, and the output from the Program is covered only if its 
  4249.   contents constitute a work based on the Program (independent of having been 
  4250.   made by running the Program). Whether that is true depends on what the 
  4251.   Program does. 
  4252.  
  4253.   1. You may copy and distribute verbatim copies of the Program's source code 
  4254.   as you receive it, in any medium, provided that you conspicuously and 
  4255.   appropriately publish on each copy an appropriate copyright notice and 
  4256.   disclaimer of warranty; keep intact all the notices that refer to this 
  4257.   License and to the absence of any warranty; and give any other recipients of 
  4258.   the Program a copy of this License along with the Program. 
  4259.  
  4260.   You may charge a fee for the physical act of transferring a copy, and you 
  4261.   may at your option offer warranty protection in exchange for a fee. 
  4262.  
  4263.   2. You may modify your copy or copies of the Program or any portion of it, 
  4264.   thus forming a work based on the Program, and copy and distribute such 
  4265.   modifications or work under the terms of Section 1 above, provided that you 
  4266.   also meet all of these conditions: 
  4267.  
  4268.   a) You must cause the modified files to carry prominent notices stating that 
  4269.   you changed the files and the date of any change. 
  4270.  
  4271.   b) You must cause any work that you distribute or publish, that in whole or 
  4272.   in part contains or is derived from the Program or any part thereof, to be 
  4273.   licensed as a whole at no charge to all third parties under the terms of 
  4274.   this License. 
  4275.  
  4276.   c) If the modified program normally reads commands interactively when run, 
  4277.   you must cause it, when started running for such interactive use in the most 
  4278.   ordinary way, to print or display an announcement including an appropriate 
  4279.   copyright notice and a notice that there is no warranty (or else, saying 
  4280.   that you provide a warranty) and that users may redistribute the program 
  4281.   under these conditions, and telling the user how to view a copy of this 
  4282.   License. (Exception: if the Program itself is interactive but does not 
  4283.   normally print such an announcement, your work based on the Program is not 
  4284.   required to print an announcement.) 
  4285.  
  4286.   These requirements apply to the modified work as a whole. If identifiable 
  4287.   sections of that work are not derived from the Program, and can be 
  4288.   reasonably considered independent and separate works in themselves, then 
  4289.   this License, and its terms, do not apply to those sections when you 
  4290.   distribute them as separate works. But when you distribute the same sections 
  4291.   as part of a whole which is a work based on the Program, the distribution of 
  4292.   the whole must be on the terms of this License, whose permissions for other 
  4293.   licensees extend to the entire whole, and thus to each and every part 
  4294.   regardless of who wrote it. 
  4295.  
  4296.   Thus, it is not the intent of this section to claim rights or contest your 
  4297.   rights to work written entirely by you; rather, the intent is to exercise 
  4298.   the right to control the distribution of derivative or collective works 
  4299.   based on the Program. 
  4300.  
  4301.   In addition, mere aggregation of another work not based on the Program with 
  4302.   the Program (or with a work based on the Program) on a volume of a storage 
  4303.   or distribution medium does not bring the other work under the scope of this 
  4304.   License. 
  4305.  
  4306.   3. You may copy and distribute the Program (or a work based on it, under 
  4307.   Section 2) in object code or executable form under the terms of Sections 1 
  4308.   and 2 above provided that you also do one of the following: 
  4309.  
  4310.   a) Accompany it with the complete corresponding machine-readable source 
  4311.   code, which must be distributed under the terms of Sections 1 and 2 above on 
  4312.   a medium customarily used for software interchange; or, 
  4313.  
  4314.   b) Accompany it with a written offer, valid for at least three years, to 
  4315.   give any third party, for a charge no more than your cost of physically 
  4316.   performing source distribution, a complete machine-readable copy of the 
  4317.   corresponding source code, to be distributed under the terms of Sections 1 
  4318.   and 2 above on a medium customarily used for software interchange; or, 
  4319.  
  4320.   c) Accompany it with the information you received as to the offer to 
  4321.   distribute corresponding source code. (This alternative is allowed only for 
  4322.   noncommercial distribution and only if you received the program in object 
  4323.   code or executable form with such an offer, in accord with Subsection b 
  4324.   above.) 
  4325.  
  4326.   The source code for a work means the preferred form of the work for making 
  4327.   modifications to it. For an executable work, complete source code means all 
  4328.   the source code for all modules it contains, plus any associated interface 
  4329.   definition files, plus the scripts used to control compilation and 
  4330.   installation of the executable. However, as a special exception, the source 
  4331.   code distributed need not include anything that is normally distributed (in 
  4332.   either source or binary form) with the major components (compiler, kernel, 
  4333.   and so on) of the operating system on which the executable runs, unless that 
  4334.   component itself accompanies the executable. 
  4335.  
  4336.   If distribution of executable or object code is made by offering access to 
  4337.   copy from a designated place, then offering equivalent access to copy the 
  4338.   source code from the same place counts as distribution of the source code, 
  4339.   even though third parties are not compelled to copy the source along with 
  4340.   the object code. 
  4341.  
  4342.   4. You may not copy, modify, sublicense, or distribute the Program except as 
  4343.   expressly provided under this License. Any attempt otherwise to copy, 
  4344.   modify, sublicense or distribute the Program is void, and will automatically 
  4345.   terminate your rights under this License. However, parties who have received 
  4346.   copies, or rights, from you under this License will not have their licenses 
  4347.   terminated so long as such parties remain in full compliance. 
  4348.  
  4349.   5. You are not required to accept this License, since you have not signed 
  4350.   it. However, nothing else grants you permission to modify or distribute the 
  4351.   Program or its derivative works. These actions are prohibited by law if you 
  4352.   do not accept this License. Therefore, by modifying or distributing the 
  4353.   Program (or any work based on the Program), you indicate your acceptance of 
  4354.   this License to do so, and all its terms and conditions for copying, 
  4355.   distributing or modifying the Program or works based on it. 
  4356.  
  4357.   6. Each time you redistribute the Program (or any work based on the 
  4358.   Program), the recipient automatically receives a license from the original 
  4359.   licensor to copy, distribute or modify the Program subject to these terms 
  4360.   and conditions. You may not impose any further restrictions on the 
  4361.   recipients' exercise of the rights granted herein. You are not responsible 
  4362.   for enforcing compliance by third parties to this License. 
  4363.  
  4364.   7. If, as a consequence of a court judgment or allegation of patent 
  4365.   infringement or for any other reason (not limited to patent issues), 
  4366.   conditions are imposed on you (whether by court order, agreement or 
  4367.   otherwise) that contradict the conditions of this License, they do not 
  4368.   excuse you from the conditions of this License. If you cannot distribute so 
  4369.   as to satisfy simultaneously your obligations under this License and any 
  4370.   other pertinent obligations, then as a consequence you may not distribute 
  4371.   the Program at all. For example, if a patent license would not permit 
  4372.   royalty-free redistribution of the Program by all those who receive copies 
  4373.   directly or indirectly through you, then the only way you could satisfy both 
  4374.   it and this License would be to refrain entirely from distribution of the 
  4375.   Program. 
  4376.  
  4377.   If any portion of this section is held invalid or unenforceable under any 
  4378.   particular circumstance, the balance of the section is intended to apply and 
  4379.   the section as a whole is intended to apply in other circumstances. 
  4380.  
  4381.   It is not the purpose of this section to induce you to infringe any patents 
  4382.   or other property right claims or to contest validity of any such claims; 
  4383.   this section has the sole purpose of protecting the integrity of the free 
  4384.   software distribution system, which is implemented by public license 
  4385.   practices. Many people have made generous contributions to the wide range of 
  4386.   software distributed through that system in reliance on consistent 
  4387.   application of that system; it is up to the author/donor to decide if he or 
  4388.   she is willing to distribute software through any other system and a 
  4389.   licensee cannot impose that choice. 
  4390.  
  4391.   This section is intended to make thoroughly clear what is believed to be a 
  4392.   consequence of the rest of this License. 
  4393.  
  4394.   8. If the distribution and/or use of the Program is restricted in certain 
  4395.   countries either by patents or by copyrighted interfaces, the original 
  4396.   copyright holder who places the Program under this License may add an 
  4397.   explicit geographical distribution limitation excluding those countries, so 
  4398.   that distribution is permitted only in or among countries not thus excluded. 
  4399.   In such case, this License incorporates the limitation as if written in the 
  4400.   body of this License. 
  4401.  
  4402.   9. The Free Software Foundation may publish revised and/or new versions of 
  4403.   the General Public License from time to time. Such new versions will be 
  4404.   similar in spirit to the present version, but may differ in detail to 
  4405.   address new problems or concerns. 
  4406.  
  4407.   Each version is given a distinguishing version number. If the Program 
  4408.   specifies a version number of this License which applies to it and "any 
  4409.   later version", you have the option of following the terms and conditions 
  4410.   either of that version or of any later version published by the Free 
  4411.   Software Foundation. If the Program does not specify a version number of 
  4412.   this License, you may choose any version ever published by the Free Software 
  4413.   Foundation. 
  4414.  
  4415.   10. If you wish to incorporate parts of the Program into other free programs 
  4416.   whose distribution conditions are different, write to the author to ask for 
  4417.   permission. For software which is copyrighted by the Free Software 
  4418.   Foundation, write to the Free Software Foundation; we sometimes make 
  4419.   exceptions for this. Our decision will be guided by the two goals of 
  4420.   preserving the free status of all derivatives of our free software and of 
  4421.   promoting the sharing and reuse of software generally. 
  4422.  
  4423.   NO WARRANTY 
  4424.  
  4425.   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR 
  4426.   THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 
  4427.   OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 
  4428.   PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 
  4429.   OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
  4430.   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO 
  4431.   THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM 
  4432.   PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR 
  4433.   CORRECTION. 
  4434.  
  4435.   12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 
  4436.   WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 
  4437.   REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 
  4438.   INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 
  4439.   OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO 
  4440.   LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR 
  4441.   THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 
  4442.   PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 
  4443.   POSSIBILITY OF SUCH DAMAGES. 
  4444.  
  4445.   END OF TERMS AND CONDITIONS 
  4446.  
  4447. -------------
  4448. MAILING LISTS
  4449. -------------
  4450.  
  4451.   There are two separate mailing lists for nedit users, and one for 
  4452.   developers. Users may post to the developer mailing list to report defects 
  4453.   and communicate with the nedit developers. Remember that nedit is entirely a 
  4454.   volunteer effort, so please ask questions first to the discussion list, and 
  4455.   do your share to answer other users questions as well. 
  4456.  
  4457.     discuss@nedit.org
  4458.  
  4459.   General discussion, questions and answers among NEdit users and developers. 
  4460.  
  4461.     announce@nedit.org
  4462.  
  4463.   A low-volume mailing list for announcing new versions. 
  4464.  
  4465.     develop@nedit.org
  4466.  
  4467.   Communication among and with NEdit developers. Developers should also 
  4468.   subscribe to the discuss list. 
  4469.  
  4470.   To subscribe, send mail to <majordomo@nedit.org> with one or more of the 
  4471.   following in the body of the message: 
  4472.  
  4473.     subscribe announce
  4474.     subscribe discuss
  4475.     subscribe develop
  4476.  
  4477. ----------------
  4478. PROBLEMS/DEFECTS
  4479. ----------------
  4480.  
  4481.  
  4482.   SOLUTIONS TO COMMON PROBLEMS
  4483.  
  4484.   For a much more comprehensive list of common problems and solutions, see the 
  4485.   NEdit FAQ. The latest version of the FAQ can always be found on the NEdit 
  4486.   web site at: 
  4487.  
  4488.       http://www.nedit.org.
  4489.  
  4490.   P: No files are shown in the "Files" list in the Open... dialog. 
  4491.  
  4492.   S: When you use the "Filter" field, include the file specification or a 
  4493.   complete directory specification, including the trailing "/" on Unix. (See 
  4494.   Help in the Open... dialog). 
  4495.  
  4496.   P: Find Again and Replace Again don't continue in the same direction as the 
  4497.   original Find or Replace. 
  4498.  
  4499.   S: Find Again and Replace Again don't use the direction of the original 
  4500.   search. The Shift key controls the direction: Ctrl+G means forward, 
  4501.   Shift+Ctrl+G means backward. 
  4502.  
  4503.   P: Preferences specified in the Preferences menu don't seem to get saved 
  4504.   when I select Save Defaults. 
  4505.  
  4506.   S: NEdit has two kinds of preferences: 1) per-window preferences, in the 
  4507.   Preferences menu, and 2) default settings for preferences in newly created 
  4508.   windows, in the Default Settings sub-menu of the Preferences menu. 
  4509.   Per-window preferences are not saved by Save Defaults, only Default 
  4510.   Settings. 
  4511.  
  4512.   P: Columns and indentation don't line up. 
  4513.  
  4514.   S: NEdit is using a proportional width font. Set the font to a fixed style 
  4515.   (see Preferences menu). 
  4516.  
  4517.   P: NEdit performs poorly on very large files. 
  4518.  
  4519.   S: Turn off Incremental Backup. With Incremental Backup on, NEdit 
  4520.   periodically writes a full copy of the file to disk. 
  4521.  
  4522.   P: Commands added to the Shell Commands menu (Unix only) don't output 
  4523.   anything until they are finished executing. 
  4524.  
  4525.   S: If the command output is directed to a dialog, or the input is from a 
  4526.   selection, output is collected together and held until the command 
  4527.   completes. De-select both of the options and the output will be shown 
  4528.   incrementally as the command executes. 
  4529.  
  4530.   P: Dialogs don't automatically get keyboard focus when they pop up. 
  4531.  
  4532.   S: Most X Window managers allow you to choose between two categories of 
  4533.   keyboard focus models: pointer focus, and explicit focus. Pointer focus 
  4534.   means that as you move the mouse around the screen, the window under the 
  4535.   mouse automatically gets the keyboard focus. NEdit users who use this focus 
  4536.   model should set "Popups Under Pointer" in the Default Settings sub menu of 
  4537.   the preferences menu in NEdit. Users with the explicit focus model, in some 
  4538.   cases, may have problems with certain dialogs, such as Find and Replace. In 
  4539.   MWM this is caused by the mwm resource startupKeyFocus being set to False 
  4540.   (generally a bad choice for explicit focus users). NCDwm users should use 
  4541.   the focus model "click" instead of "explicit", again, unless you have set it 
  4542.   that way to correct specific problems, this is the appropriate setting for 
  4543.   most explicit focus users. 
  4544.  
  4545.   P: The Backspace key doesn't work, or deletes forward rather than backward. 
  4546.  
  4547.   S: While this is an X/Motif binding problem, and should be solved outside of 
  4548.   NEdit in the Motif virtual binding layer (or possibly xmodmap or 
  4549.   translations), NEdit provides an out. If you set the resource: 
  4550.   nedit.remapDeleteKey to True, NEdit will forcibly map the delete key to 
  4551.   backspace. The default setting of this resource recently changed, so users 
  4552.   who have been depending on this remapping will now have to set it explicitly 
  4553.   (or fix their bindings). 
  4554.  
  4555.   P: NEdit crashes when I try to paste text in to a text field in a dialog 
  4556.   (like Find or Replace) on my SunOS system. 
  4557.  
  4558.   S: On many SunOS systems, you have to set up an nls directory before various 
  4559.   inter-client communication features of Motif will function properly. There 
  4560.   are instructions in README.sun in /pub/v5_0_2/individual/README.sun on 
  4561.   ftp.nedit.org, as well as a tar file containing a complete nls directory: 
  4562.   ftp://ftp.nedit.org/pub/v5_0_2/nls.tar. README.sun contains directions for 
  4563.   setting up an nls directory, which is required by Motif for handling copy 
  4564.   and paste to Motif text fields. 
  4565.  
  4566.  
  4567.   KNOWN DEFECTS
  4568.  
  4569.   Below is the list of known defects which affect NEdit. The defects your copy 
  4570.   of NEdit will exhibit depend on which system you are running and with which 
  4571.   Motif libraries it was built. Note that there are now Motif 1.2 and/or 2.0 
  4572.   libraries available on ALL supported platforms, and as you can see below 
  4573.   there are far fewer defects in Motif 1.2, so it is in your best interest to 
  4574.   upgrade your system. 
  4575.  
  4576.  
  4577.   All Versions
  4578.  
  4579. DEFECT
  4580.   Operations between rectangular selections on overlapping lines do nothing. 
  4581.  
  4582. Work Around
  4583.   None. These operations are very complicated and rarely used. 
  4584.  
  4585. DEFECT
  4586.   Cut and Paste menu items fail, or possibly crash, for very large 
  4587.   (multi-megabyte) selections. 
  4588.  
  4589. Work Around
  4590.   Use selection copy (middle mouse button click) for transferring larger 
  4591.   quantities of data. Cut and Paste save the copied text in server memory, 
  4592.   which is usually limited. 
  4593.  
  4594.  
  4595.   REPORTING DEFECTS
  4596.  
  4597.   The NEdit developers subscribe to both discuss@nedit.org and 
  4598.   develop@nedit.org, either of which may be used for reporting defects. If 
  4599.   you're not sure, or you think the report might be of interest to the general 
  4600.   NEdit user community, send the report to discuss@nedit.org. If it's 
  4601.   something obvious and boring, like we misspelled "anemometer" in the on-line 
  4602.   help, send it to develop@nedit.org. If you don't want to subscribe to the 
  4603.   Mailing Lists, please add a note to your mail about cc'ing you on responses. 
  4604.  
  4605.